You are not logged in.
Hi,
I have an external, mechanical keyboard by WASD keyboards (CODE keyboard). When I press and hold every key on my keyboard, it repeats, with the exception of the media keys (brightness up/down, volume mute, volume up/down, etc.). When I hold them down, they repeat once.
The do, however, repeat on the internal laptop keyboard. The puzzling aspect to me is that the xev outputs are almost identical.
Here is what I get when I hold the 'Volume Up' key (F12) on my internal keyboard:
FocusOut event, serial 33, synthetic NO, window 0x1a00001,
mode NotifyGrab, detail NotifyAncestor
FocusIn event, serial 33, synthetic NO, window 0x1a00001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 33, synthetic NO, window 0x0,
keys: 2 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Here is what I get when I hold the volume up combo (Fn + PgUp) on my CODE keyboard:
MappingNotify event, serial 32, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
FocusOut event, serial 32, synthetic NO, window 0x1000001,
mode NotifyGrab, detail NotifyAncestor
FocusIn event, serial 33, synthetic NO, window 0x1000001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 33, synthetic NO, window 0x0,
keys: 2 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
I can't figure out why the first one repeats while the second one does not.
I'm assuming that the MappingNotify event has to do with the holding of the Fn key on the external keyboard, which does nothing.
I'm also sure that this can to be dealt with in the operating system, since the volume up key does repeat with my external keyboard on OS X (same laptop, dual boot).
Thanks.
EDIT: I should also mention that, on the CODE keyboard, the Fn/media keys are enabled via a DIP switch on the back, while the internal keyboard seems to have the media keys enabled by default.
Last edited by cmg (2016-11-23 23:58:38)
Offline
You should test xev w/o the key being grabbed by some shortcut daemon so you'll see the press/release events that turn into the system and distinguish, whether either only one is repeated by the system or both are repeated by the client only.
Also you can then try "xset r <keycode>" for the non-repeating keycode and see whether that makes a difference.
Online
xset r 122 and 123 don't work, unfortunately.
Here's the xev output to the internal keyboard without sxhkd grabbing:
MappingNotify event, serial 48, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
KeyPress event, serial 48, synthetic NO, window 0xe00001,
root 0xd7, subw 0x0, time 3040895, (96,55), root:(2730,1555),
state 0x0, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 49, synthetic NO, window 0xe00001,
root 0xd7, subw 0x0, time 3040991, (96,55), root:(2730,1555),
state 0x0, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
And here's the xev for the external keyboard:
MappingNotify event, serial 46, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
KeyPress event, serial 46, synthetic NO, window 0xe00001,
root 0xd7, subw 0x0, time 2917385, (117,130), root:(2751,1630),
state 0x0, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 46, synthetic NO, window 0xe00001,
root 0xd7, subw 0x0, time 2917385, (117,130), root:(2751,1630),
state 0x0, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Offline
If there's no further output, it seems serverside autorepeat doesn't occur for either of those keys (what's weird, sxhkd doesn't seem to do client side repeating)
An interesting detail is that the serial increments for the working internal, but not the non-working external keyboard, maybe due to the Fn key.
Have a look at "xinput" and the structure of the devices. Sometimes multimedia keys are a second device and sometimes, that shows up as pointer rather than as keyboard. Maybe there's a difference?
Online
FWIW, xev reports repeated KeyPresses for XF86AudioRaiseVolume on my USB keyboard.
Run evtest to see if the kernel doesn't by any chance report this key as released immediately after it's pressed.
Offline
i was wrong. xev does repeat the keypresses for the internel keyboard but not the external one.
when I run `sudo evtest` I get two devices for my external keyboard event6 and event12. event6 repeats all the other keys but does not pickup the media keys. event12 picks up only the media keys and does not repeat.
Event: time 1479945312.761729, -------------- SYN_REPORT ------------
Event: time 1479945314.705701, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00e9
Event: time 1479945314.705701, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1
Event: time 1479945314.705701, -------------- SYN_REPORT ------------
Event: time 1479945314.705723, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0
Event: time 1479945314.705723, -------------- SYN_REPORT ------------
Last edited by cmg (2016-11-23 23:55:33)
Offline
So what does xinput look like (sonds much like the media keys are an extra device which is considered to be a pointer)
Online
So evtest reports that the key was released after 22μs. That's pretty fast
This has nothing to do with X at this point. Either kernel bug or hardware limitation. Are you sure it's not a known issue with this model of keyboard?
The next logical step would be to monitor USB communication with wireshark and see if the keyboard sends any notification when the key is released.
Offline