Questions tagged [keyboard-event]
The keyboard-event tag has no usage guidance.
68
questions
0
votes
0
answers
30
views
Read physical state of keyboard modifiers in Linux (preferably in C or C++)
Is there a way to programmatically read, detect or get notified about the actual physical state of a modifier key, without requiring root level access rights?
I tried X11, XCB and XKB, but their event ...
0
votes
0
answers
21
views
Keyboard ignores first key pressed on Manjaro Gnome
After one or two minutes, the first key I press is ignored. Which key doesn’t matter, Meta, Alt, Space, Shift, numbers, letters. It is as if the keyboard goes on a dormant mode after about 90 seconds ...
0
votes
0
answers
201
views
keyboard layout switching with ibus
I've had to leave xim behind because of various graphical issues.
And I'm trying to set up ibus but having trouble getting it to cycle through keyboards.
Other info:
Debian Testing
Awesome WM
This ...
0
votes
0
answers
29
views
how to assign sound effect to some keyboard keys
I use gnu+linux, and I need to assign an audio sound to the
| keys, Imp pant and the mouse click only, for educational use,
¿how can I achieve that assignment if I'm user of the i3wm window
manager?
2
votes
1
answer
96
views
Razer keyboard : Use keyboard as mouse under X
OP entirely re-edited.
My Razer Cynosa chroma is one physical device (basically no more than a PC_105 keyboard) offering the particularity to offer 3 interfaces (1) one of them for simultaneously ...
2
votes
0
answers
41
views
How to prevent the browser from seeing my keystrokes?
My browser (chrome but I think it doesn't matter) receives events for keystrokes which are not intended for it. For example, I'm doing alt+tab in Mate and then I press escape (while still holding the ...
0
votes
0
answers
38
views
Keepass causes immediate Linux logout when using auto-type
Today I had to restart my computer after a total freeze of Linux. After that I now have the problem that KeepassXC 2.7.1 leads to a immediate logout of my Linux system as soon as I try to use the auto-...
2
votes
0
answers
320
views
/dev/input/event doesn't report keys being pressed
I have an usb keyboard connected to a linux box.
I need to capture all keys that have been pressed and released.
My keyboard n-key rollover meaning that it doesn't have limits on number of ...
2
votes
1
answer
105
views
Block multiple keypress events that has same timestamp
I have a faulty keyboard that will fire additional keys when i press a single key.
for example,
when i click letter "D" on keyboard it will send "D5"
$xev -event keyboard
...
1
vote
0
answers
963
views
X11 key names to Linux keycodes
My program uses the X11 key names like exclam and XF86Forward but internally uses the Linux keycodes found in /usr/include/linux/input-event-codes.h.
It's just an awk program, and I've written an ...
0
votes
1
answer
36
views
executing hotkeys from a script into an application
Is it possible to open an application, then execute some hotkeys associated with that application using a script? For example if I wanted to open Firefox (using Firefox & for example)then I wanted ...
1
vote
0
answers
684
views
How to access gpio-keys from a shell script
In my embedded linux system, I defined some GPIOs as keys in the device tree so I can use them as keys in my application. This works fine so far.
Now I want to add an early startup script to respond ...
2
votes
0
answers
789
views
Keyboard input N-Key Rollover
Question
Is there any way to programmatically negotiate and enable NKRO (N-Key Rollover) for plugged keyboards when that feature is available?
Also, how to properly distinguish between "standard ...
0
votes
1
answer
64
views
What is this popup in Gnome 40?
I'm trying to understand the meaning of those popups:
Those are triggered by a button of a remote which evtest interprets as F21:
Event: time 1635529094.562219, type 17 (EV_LED), code 0 (LED_NUML), ...
1
vote
0
answers
191
views
Make xkb produce two symbols on one key press (e.g. make `ctrl`+`+` & `ctrl`+`=` produce same (combined) effect to get rid of `Shift` for zooming in)
Some apps use ctrl++ and some ctrl+= to zoom in. Only some allow to customize. If all used same, I would just remap the keyboard not to use Shift. Can I make apps receive signals that both ...
0
votes
0
answers
160
views
Duplicate events from Logitech G613 Bluetooth keyboard
For some tiime (sic!) now, I've been getting random duplicate events from my Logitech G613 Bluetooth keyboard. I've no idea how it's happening, and iit (again!) seems to happen with all keyboard keys -...
1
vote
2
answers
47
views
Change what user writes anywhere on the screen to another string
So I'd like to understand this problem that I'm trying to solve and see if it's even possible to do it, realistically. I want to write a script, or something like that, that would change some string ...
1
vote
0
answers
80
views
X11: Some applications misunderstand xkb keymap
I want to remap my keys in the following way: ctrl+j/k -> left/right and ctrl+h/l -> ctrl+left/right. So I got the default xkb file and added the following contents into it.
First, I defined a ...
1
vote
1
answer
82
views
Overide delete(-rm) event to move to(-mv) folder
I have a trouble with deleting files on my company's LAN network. I have 5x5TB shared disks where data is stored. About 20 clients (PC Users) have access to the disks. The big problem is when someone ...
3
votes
1
answer
1k
views
What device drivers are needed to fully recognize a USB Keyboard?
My problem is I have an embedded system normally headless.
It has a serial console I use for debugging, but will not be present in production.
It has no vga/graphics/monitor/whatever.
It doesn't have ...
2
votes
0
answers
365
views
Unable to send keypress to Xvfb display using XTestFakeKeyEvent in C
Using this short snipped of code I am able to capture events from the keyboard (/dev/input/event1) and print them properly. However, sending them to the Xvfb display using XTestFakeKeyEvent does not ...
0
votes
1
answer
112
views
In Vim on KDE Ctrl-w no longer works to changes panes
Normally, when I have two panels (windows?) open in vim, I use c-w c-w to switch between them. This suddenly stopped working.
So one would think the problem could be with vim, with the terminal ...
0
votes
1
answer
94
views
Navigating Text...Is there a way to go back and/or forward N characters or jump to next/previous non-alphanumeric character?
I'm talking in terms of keyboard navigation shortcuts, that would apply to any text box/editor/etc...Sometimes I'd like to just have a faster means of jumping to a particular location in a string, but ...
0
votes
1
answer
234
views
Are the keycodes of modifier characters independent of keyboard layout and keyboard model?
For example, is the keycode of left control always 37? Where can I find a list of such keycodes?
3
votes
0
answers
87
views
Disable repeat keys only for function keys e.g. (fn + f10)
Sometimes function keys e.g. Fn+F10 gets stuck.
How do I disable repeat keys only for these type of keys e.g. Fn+any function key)
0
votes
1
answer
283
views
Simultaneous keystrokes - emulating mouse movements with keyboard
I'm trying to emulate mouse movements and actions with keyboard, and I succeeded in remapping everything (e.g.: hjkl to movements), with xkb (in particular using xkbset -m) and xmodmap.
The problem ...
2
votes
1
answer
1k
views
`xev` doesn't register my `Fn+F4` keypress? How to bind this combination?
My question is simple. xev isn't registering Fn+F4 keypress on my Asus FX505DT running Kubuntu 19.10.
So, how shall I proceed with solving this issue?
2
votes
1
answer
4k
views
Disable a specific key on a specific keyboard
I suspect this can't be done, but I would like to disable a specific key (namely '6' on the top row) on a specific keyboard (namely my laptop internal keyboard). The key is spamming 6s but is ...
1
vote
0
answers
650
views
How can I translate keycodes from /dev/input/event* to ASCII in Embedded Linux?
I'm building an embedded linux image with yocto. I can see the keys coming in over /dev/input/event0. I can view them using showkey -k but not showkey -a. I've also tried with an ncurses program I ...
2
votes
0
answers
216
views
type string as if it were a keyboard
I have a bunch of unicode symbols in a file and a script to select and copy one of them (dmenuunicode script in this repository which I've forked). But instead pasting them I would like to save one ...
3
votes
0
answers
635
views
setkeycodes: ioctl KDSETKEYCODE: Invalid argument
I'm trying to map Win + Left-Arrow to Home.
When I run showkey --scancodes (on console) and press Win + Left-Arrow, I get:
0xe0 0x5b 0xe0 0x4b 0xe0 0xdb 0xe0 0xcb
showkey (also at console) tells ...
0
votes
1
answer
799
views
Shell script loop while not reading [closed]
I'm trying to figure out the best way to halt a running script using a keyboard shortcut while the terminal is not the active window.
This led me to learn about watching keyboard events with cat /dev/...
1
vote
2
answers
907
views
Why are ctrl-m and return keys the same \r char? [duplicate]
Anyone know why ctrl-m and return are the same control chars?
1
vote
2
answers
228
views
Keyboard key "s" not triggered [closed]
I recently installed XFCE over my arch - used gnome before.
After some time using XFCE i discovered that my keypress "s" does not work as expected (works first in XFCE without problems).
Output of ...
3
votes
2
answers
583
views
Merge two usb ports/two keyboards into one
I use two keypads (Koolertron AE-SMKD72 Type A), that I use as one split keyboard. But they are recognized as two separate keyboards, what causes some problems:
I use an alternative keyboard layout ...
0
votes
1
answer
613
views
Double Key Click Event?
My X60T has several buttons designed to be used in tablet mode. To try and optimize the buttons, I was wondering if there is any way to recognize double clicks to trigger a command? They behave just ...
1
vote
1
answer
3k
views
Read keyboard inputs in Linux
I am making a Ruby program so I can play different sounds when a key is pressed. Key A will make different sound from key S and so on. I want to get raw inputs rather than using some ruby gems.
For ...
0
votes
2
answers
348
views
Showkey with timestamp
How can I record keyboard actions with the timestamp, either to console, or preferably to a file?
I have showkey output like:
keycode 28 release
keycode 30 press
keycode 30 release
keycode 48 ...
0
votes
1
answer
131
views
configure non-modifier as a modifier key
This question is similar to:
https://askubuntu.com/questions/33751/making-any-key-into-a-modifier-key
I have a machine with a non-standard keyboard layout (lenovo x1 carbon) where the CapsLock key ...
-4
votes
1
answer
75
views
How are wide chars handled atomically? [closed]
Some languages have wide chars. A wide char can have multiple bytes. When you type a wide char in console or X, you are actually sending several bytes. A single-byte char is by itself atomic, in the ...
4
votes
1
answer
2k
views
setxkbmap conflicting with xmodmap
So initially I had the following in my ~/.Xmodmap which mapped CapsLock+HJKL to left/down/up/right like in vim:
keycode 66 = Mode_switch
keysym h = h H Left
keysym j = j J Down
keysym k = k K Up
...
4
votes
1
answer
2k
views
BASH question: using read, can I capture a single char OR arrow key (on keyup)
So here's my deal: working in BASH, I have already built out a function which works just fine that accepts an array or any number of parameters, and spits out an interactive menu, navigable by arrows ...
1
vote
0
answers
30
views
Fix Numlock for one specific keyboard only (leaving the behaviour of other devices untouched)
My question is basically identical to this U&L Q&A titled: Enable numlock only for external keyboard, with a slight difference.
I have the solution running to enable Numlock whenever an ...
3
votes
1
answer
236
views
Can emacs running under urxvt recognize the Hyper modifier key?
Can emacs running under urxvt be made to recognize Hyper? From what I can tell, it doesn't distinguish hyper+something from just plain unmodified something. urxvt itself does recognize the modifier, ...
0
votes
1
answer
151
views
What is the intention of KEY_NEXT compared to KEY_NEXTSONG?
I'm in the process of mapping IR remote buttons in LIRC. I looked through input-event-codes.h and came across KEY_NEXT and KEY_NEXTSONG, so I did some searching but I couldn't find descriptions for ...
64
votes
19
answers
184k
views
Ubuntu 18.04 won't wake after screen lock and blank / suspend / sleep
I am trying to run Ubuntu 18.04 on a laptop with an AMD A12 processor and Radeon R7 graphics. I am having nothing but problems and am very discouraged with Ubuntu though I used 12.04 for years without ...
2
votes
2
answers
869
views
Update ZSH PS1 / prompt on keypress
Part of my ZSH prompt is a caps lock indicator.
function Capslock(){
x=$(xset -q | grep Caps) 2> /dev/null || exit 0
x=${x:22:1}
if [[ $x == "n" ]]; then
echo ""
fi
}
...
2
votes
0
answers
574
views
Some keys only send a KeyRelease event
For some reason some keys only send a KeyRelease event and not a KeyPress one:
This is what I get when I press Print Screen. This makes the Print Screen key unusuable for remapping to keys that send ...
5
votes
2
answers
11k
views
KeyBoard Monitoring without display
Working on a project that uses a little keyboard and an E-ink display which will run on a raspberry pi Zero. I have tried a couple of keyboard packages for python (pynput, pyxhook) and have written/...
1
vote
1
answer
635
views
Debug/fix a key autorepeat issue?
I'm using Caps Lock as a Control key, configured with the following command (I'm running Gnome):
gsettings set org.gnome.desktop.input-sources xkb-options \
"['caps:ctrl_modifier']"
Sometimes when ...