I have a problem with repeated key presses. When I use media key on my keyboard, such as pause (for which I have to actually press two keys, one on the right side of the alt key, i will address it as a modifier key, and F7) the pause command sent to the media player is repeated, which results in a pause/play loop. This is obviously not desirable. If I press the keys really fast I'm able to avoid the repeat, but I'm not able to always get the timings right. I think it has to do in some way with the modifier key being repeated and not being released after the command is sent. Here's the xev
output:
Outer window is 0x5200001, inner window is 0x5200002
...
MappingNotify event, serial 37, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
KeyRelease event, serial 37, synthetic NO, window 0x5200001,
root 0x506, subw 0x0, time 16607317, (714,467), root:(864,619),
state 0x10, keycode 248 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
FocusOut event, serial 37, synthetic NO, window 0x5200001,
mode NotifyGrab, detail NotifyAncestor
FocusIn event, serial 38, synthetic NO, window 0x5200001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 38, synthetic NO, window 0x0,
keys: 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
KeyPress event, serial 38, synthetic NO, window 0x5200001,
root 0x506, subw 0x0, time 16607493, (714,467), root:(864,619),
state 0x10, keycode 248 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 38, synthetic NO, window 0x5200001,
root 0x506, subw 0x0, time 16607995, (714,467), root:(864,619),
state 0x10, keycode 248 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 38, synthetic NO, window 0x5200001,
root 0x506, subw 0x0, time 16607995, (714,467), root:(864,619),
state 0x10, keycode 248 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 38, synthetic NO, window 0x5200001,
root 0x506, subw 0x0, time 16608025, (714,467), root:(864,619),
state 0x10, keycode 248 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 38, synthetic NO, window 0x5200001,
root 0x506, subw 0x0, time 16608025, (714,467), root:(864,619),
state 0x10, keycode 248 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 38, synthetic NO, window 0x5200001,
root 0x506, subw 0x0, time 16608056, (714,467), root:(864,619),
state 0x10, keycode 248 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
...
And the KeyPress/KeyRelease repeats until I press another key.
So, how do I fix that while keeping repeat on any "normal" keys enabled? I use ubuntu 19.04