845 questions
0
votes
0
answers
76
views
Debian 13 + XFCE: Top-row "9" key sends keycode 18 but produces no output (works with Fn as numpad 9) [closed]
I'm on Debian 13 (trixie) with XFCE desktop environment on a 13-inch laptop (no dedicated numpad).
The physical "9" key on the top row:
Sends keycode 18 (confirmed with xinput test and xev)
...
1
vote
1
answer
93
views
What to use instead of KeyboardEvent.keyCode for keyboard shortcuts across different layouts?
I have an application that relies on the deprecated keyCode property for keyboard shortcuts. I need to update my code to use a modern alternative that works consistently regardless of the user's ...
2
votes
1
answer
68
views
Interpreting VIM key sequence from xterm
Some of the key inputs on my nvim running in xterm are a bit odd. For example, to get the '^' key, I have to press shift-6, and instead of it just generating a '^' character, it actually generates '&...
3
votes
1
answer
123
views
Is `0x1F` an ASCII scan code, and if so, how is it repeatable?
I am writing a CLI text editor in c. I have to handle a lot of CTRL+key inputs. Right now, I am using a macro that gets the key you want to pair with CTRL, like this: #define CTRL(key) ((key) & ...
0
votes
1
answer
54
views
laser reader and vba excel
Using a laser reader and the KEYDOWN event of excel vba, which key on the keyboard is associated with a laser reader?
I need to use Excel VBA keydown event for a textbox object but I use a laser ...
-1
votes
2
answers
219
views
How can I prevent user typing certain letters?
function NumberKey(event) {
let charCode = event.which || event.keyCode;
console.log(event.keyCode)
if ((charCode >= 48 && charCode <= 57) || // Number (0-9)
(...
2
votes
0
answers
81
views
How to handle accented characters with events KeyCode vb.net
I'm capturing the keyboard keys that are pressed by the CreateKeyboardHook event, where it returns all the keys that were pressed (making it a keylogger, without storing or anything like that, just ...
1
vote
0
answers
17
views
working on serial/references number input filed - validations-keycodes
we have only one Input Filed for both Serial and References number entry.
{so, 1st character can be A or 0-9, 2nd to 8th characters must be -> btw 0-9}
serial: number requirement {0-9} - only 8 ...
-1
votes
1
answer
94
views
why do I have to press escape on the keyboard twice in vb.net
I'm using the DropdownStyle Combobox: Dropdown
If I press on the keyboard with enter then only once but why if I press on the keyboard with escape then it must be done twice,
I use the String.Equals ...
0
votes
1
answer
189
views
How to use keycodes in an array to filter which keys are taken as input within a 'keyup' event listener?
I am trying to build a wordle clone, but I am running into issues when trying to filter out only the alphabet to be taken as keyboard inputs for the game.
Currently I have a Keyboard container that ...
0
votes
2
answers
243
views
key code 10182 for Exit button in tizen studio?
key code 10182 for Exit button in tizen studio does not work ?
you proposals
document.addEventListener('keydown', function(event) {
if (event.keyCode === 10182) { // 101 is the key code for the ...
0
votes
0
answers
26
views
I need to give condition between english keyboard layout and japanese keyboard layout using jquery
The following code condition is Japanese keyboard keycode and If I change English keyboard layout it needs to work.
$('input,textarea,div#editorId').on('keydown', function(e) {
if ((e.shiftKey == ...
0
votes
1
answer
39
views
The part keeps rotating even when l press space bar
This is an script that i created, however, it is not working. It is supposed to stop the rotation when i press the space bar:
local spinning = script.Parent
local state = true
local function ...
0
votes
2
answers
72
views
why am i getting null value eve if i press 'asdfghjkl'?
window.addEventListener('keydown',function(e){
const audio = document.querySelector(`audio[data-key=${e.code}]`)
console.log(audio);
});
<div class="keys">
<div data-key="...
0
votes
0
answers
363
views
KeyDown event doesnt trigger with Shift. Other Keys Work
I´ve got multiple buttons that need to be accessed through KeyDown events in a Windows Form.
I´ve set up some of them without any problems, but when setting the KeyCode to Keys.LShift it just doesn´t ...
0
votes
0
answers
44
views
Problem with Window.event.keyCode and .dat memory read VBS hta [duplicate]
Basically, what I am trying to do is to create a system where I can store keycode in a .dat file named Bindings and use them to define the key associated with an action. For example the key escape is ...
0
votes
2
answers
173
views
c++ keyboards kbd.h need more information about processing the state of the modifier keys
I am starting to work with keyboardlayouts on windows using kbd.h. I understood the part scancode->keycode via kbdxx.dll but struggle on the part of processing modifier keys (shift, Ctrl,Alt) ...
2
votes
1
answer
1k
views
Example for scancode vs virtual scancode vs keycode vs virtual keycode vs virtual key
I have problems figuring out the the difference between scancode, virtual scancode, keycode, virtual keycode, virtual key:
I know that virtual Key (or virtual keycode ??) is a pressed modifier
(Ctrl, ...
0
votes
2
answers
142
views
What can i use instead of event which is deprecated?
i need to move the element by the arrows (arrowUp arrowDown and so on)but event key/keyCode is deprecated. So what can i use instead of them?
4
votes
2
answers
218
views
Encoding of key codes (virtual?) send to virtualbox-guest-system
How to send a string to a virtualbox-guest-machine?
This is my code:
public void testKeyboard() throws Exception {
IVirtualBox b = connect();
List<IMachine> machines = b.getMachines();
...
-1
votes
1
answer
81
views
ɔ̃ does not exist in JavaScript
I was doing a simple program in JS to get a list of keyCodes for all french phoneme symbols in the International Phonetic Alphabet, and I realised that key like ɔ̃ are actually considered as ɔ and ~.
...
0
votes
1
answer
328
views
Cypress - how to draw a line using cypress while holding option key on a text file
I need to draw a line using one application tool. I tried code below, it is not working. So basically I need to click on a word while holding option key and then click on another word, it will create ...
-1
votes
1
answer
985
views
Jquery: Use preventDefault() to disable only the space bar
I'd like to use the function preventDefault() to disable the spacebar from jump-scrolling down, like it usually does in Chrome, for example. If I try this:
$('html').keydown(function(e){
if(e.keyCode ...
0
votes
0
answers
170
views
Next page "spacebar button" press
I need the JavaScript to go to 'pag2' when I press spacebar, but it does nothing, there isn't anything on 'pag1' or 'pag2' (the files)
`
document.body.onkeyup = function(e) {
if (e.key == " &...
1
vote
1
answer
158
views
Javascript movement delay on initial keypress (3D)
I want the movement to be smooth upon pressing a key, the object does an initial movement and then starts moving completely when holding down the button.
//movement speed
var xSpeed = 0.5;
var zSpeed ...
1
vote
0
answers
492
views
Javascript, Android and Chrome in industrial devices: enter key not firing event keyup and keydown in input text fields
Recently I updated the Chrome to version 106 in some industrial devices working with Android. These devices works with web pages developed with PHP and Javascript routines. Now I show you the problem ...
0
votes
2
answers
435
views
Unity: allowing keycodes to shift with a variable
I'm currently making a purposefully frustrated mini-game where the movement keys change each time you use them. I intended to do this with the code bellow.
public class Flop : MonoBehaviour
{
...
0
votes
0
answers
268
views
The escape key does not work the same way in all browsers
With the following code I can scroll back and forth in my picture gallery with the arrow keys. I would like to be able to use Escape to end the display of the images - but this only works in Chrome ...
1
vote
1
answer
116
views
KDGKBENT returns wrong keysym values?
Example code:
#include <stdio.h>
#include <stdlib.h>
#include <linux/keyboard.h>
#include <sys/ioctl.h>
#include <sys/kd.h>
int
main(int argc, char **argv) {
struct ...
0
votes
0
answers
264
views
Convert WinForms KeyCode to USB-HID-KeyCode
I built a circuit with Arduino Micro that sends Keyboard inputs to my Laptop. With a program on my Laptop I want to define what keyboard inputs should be simulated. To do that I try to record keycodes ...
0
votes
1
answer
124
views
The keys won't remove transition after clicked
I think the problem could be with the
const audio = document.querySelector(audio[data-key="${e.keyCode}"]);
const key = document.querySelector(.key[data-key="${e.keyCode}"]);
It ...
2
votes
0
answers
42
views
keyCode not working, geting scratch on keyCode on using document.onkeyup or onkeydown, scratch will go when i use document.onclick, but i want onkeyup
document.onkeyup = function(e){
console.log("Key code is:",e.keyCode)
if(e.keyCode == 38){
dino=document.querySelector('.dino');
dino.classList.add('animateDino');
setTimeout(()=&...
0
votes
1
answer
84
views
Swift - keycode keyboardReturn not working
I have hotkeys on my app when using a physical keyboard and all the keys work fine except for the return key. Is there a reason why or a workaround to make this work? Thanks.
extension ...
0
votes
2
answers
3k
views
Unity C# GetKey() not working when i set a variable with the button i want pressed in
Im trying to make it so that you can assign whatever key you want to make the player jump/move via unity itself and not the script. I want to set public variables with the keycodes of each key and use ...
1
vote
2
answers
849
views
P5.js SOME Keycodes not responding
I've been surfing through a lot of old P5.js questions and ran into this question: p5.js code isnt executing when spacebar is pressed in combiniation with up and left I tried out a few of my ideas in ...
0
votes
0
answers
316
views
What do I replace KeyCode with
Im unsure how to replace e.keycode? should it be KeyBoardevent?
document.body.addEventListener("keyup", function(e){
keys[e.keyCode] = false;
1
vote
0
answers
168
views
Creating a KeyEventArgs field with the desired KeyCode value in C#
I wanna make an opportunity to rebind some buttons. I have "launchParametrs.txt" file so the KeyEventArgs field must get KeyCode from "Start: (bind button from file)". But I can't ...
0
votes
1
answer
1k
views
Angular: How can I prevent the scrollbar from moving when navigating with the arrow keys up and down?
I have developed a table and which I have integrated a self-created navigation. Problem is, when I scroll up and down so always moves the scrollbar with. Is there a way when I press keydown or keyup ...
-2
votes
1
answer
841
views
Activate button by Pressing Enter in Texbox
Im new here in Coding and im Trying to activate my button from a Textbox by pressing enter. I tried to google for the Answer but Visual Studios say it doesnt work.
The most common Thing i read while ...
-1
votes
1
answer
187
views
How do I allow my program to detect keyCode without getting a type-error in Javascript?
I am fairly new to coding and I have been constantly been coming upon one problem. When making a game, such as snake or pong, I tend to use an event listener to listen for a keydown event such as : ...
-1
votes
1
answer
275
views
How do I get Input to read other keys and not just Up and Down
I saw some codes like this:
if (Input.GetKey(KeyCode.UpArrow))
and
if (Input.GetKey(KeyCode.UpArrow))
Wanted to know how do I put other keys, as in the case of the "a"
if (Input.GetKey(...
1
vote
1
answer
961
views
How does 4 byte scancode get mapped to keycodes in Linux?
I was messing around with scancodes and keycodes in Debian Buster and I've found something strange.
Using sudo showkey -s I discovered that the scancode of the PrintScreen/SysRq key of my USB wired ...
-1
votes
1
answer
45
views
How can I access the result of this function on this other function?
So i have this text input field and I have the showKeyCode() function which gets the value from the text input and prints the keycode representation of the pressed key into the console.
function ...
0
votes
1
answer
75
views
I want to alert a value when I press the Esc button in prompt, but I have no idea... (code below)
const login = prompt("Enter username!", "");
if (login === "Admin") {
prompt("Enter password!");
} else if (login === "" || login.keyCode === 27) {
alert("Canceled");
} else {
alert("I don't ...
0
votes
1
answer
633
views
Vanilla Javascript: How do I create a working searchbar with hidden results?
I am pretty new to Javascript and have been using it for almost a month. I am trying to create a website easter egg that can be found by typing a hidden word into the searchbar. My problem mostly has ...
0
votes
2
answers
173
views
How can i get the character of a key code
I have some code which captures a key.
Now i have in event.code the real key-name and in event.key i get the key-char.
To make an example: I press SHIFT and J, so i get:
event.code: SHIFT KEYJ
event....
-5
votes
2
answers
1k
views
how do I extend virtual key codes in the windows API (Win32)?
I want to create a new virtual key code in the windows API that I can assign scan codes to and read with GetKeyState but I cannot find a way to extend the enumeration.
I have tried using "unknown&...
1
vote
1
answer
403
views
Convert libgdx int keycode to non-QWERTY char
I've got a bunch of code set up that uses InputListener.keyDown to test keys pressed, and uses those keycodes to display keystroke hints. However, on non-QWERTY keyboard layouts (like Dvorak or ...
1
vote
1
answer
220
views
Virtual keycode for key 2 (small, just on top of tab key)
I'm looking for a way to be able to capture the key shown in the photo below: On a French keyboard, it's the key that only has the character 2 (small).
Key 2
I first tried to use the Esc key but it ...
1
vote
2
answers
334
views
Unity 2D Object not Moving while using GetKey and tranform.position
Got a problem with my code (on Unity 2D).
I'm trying to make a PacMan like for my class, and my PacMan doesn't want to move at all.
He's animated but he's not moving.
public class PacmanMove : ...