0

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

1 Answer 1

0

Possibilities to customize Delay and Speed for individual keys only, if at all possible, are not exposed to the user. General settings for Keyboard Delay and Speed, however, can be found under "Universal Access" in "Settings". Click "Repeat Keys". A dialog will appear allowing you to tweak "Delay" (i.e., for how long do you need to hold the key before it starts repeating) and Speed (i.e., how fast will the key repeat).

The default for "Delay" is 500 ms, i.e. half a second. For a non-disabled person, this is plenty of time to press and release a Pause key without triggering repeats. Yours has probably been set to a very low value at some time. If, however, an ability problem is involved where the default time does not work, then try to increase the Delay value, or turn it off altogether.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .