Debian – Enable Key-Repeats for Arrow Keys

arrow keyscaret-cursordebiankey-dynamics

I need disabled key-repeats because 10% greater long-term WPM then, as described in the thread How to Calibrate typing when unstable Cursor/Typing in Debian.
However, I think the feature of repositioning caret position is useful with long-presses of arrow-keys in using key-repeats.
I would like to maintain the long-presses of them but have custom settings for delay and speed.
My settings in Keyboard > Typing where the delay and option should be individualized for arrow-keys in Fig. 1.
Options where I cannot get (1) work at all and I keep option (2) too cumbersome for the task because of many buttons and keyboards

  1. Disable all key-repeats and enable then those of arrow keys.
  2. Allow all key-repeats and disable everything else than arrow keys. (olejorgenb's answer) – – I think this proposal is not solid so reject because cannot reproduce the effect as described. – – Also outside of the scope of the question in the title.

Fig. 1 Unchecked Key presses repeat when key is held down

enter image description here

Differential solutions

  1. Is there a way to have it so that key repeats aren't disabled but only start after you've held a key down for a longer time? [Random832] – – Actually, I would like to know how this can work if you make many rapid changes in the directions of arrow-keys.

Hardware: Asus Zenbook UX303UA
OS: Debian 8.5 64 bit
Linux kernel: 4.6

Best Answer

I'm not sure I exactly what you want, but it's possible set which individual keys (technical keycodes) that should repeat. It does not seem to be possible to set individual rate and delay though

$ xset --help
    <snip>
    To turn auto-repeat off or on:
    -r [keycode]        r off
     r [keycode]        r on
     r rate [delay [rate]]

To find the keycode corresponding to a key use eg. xev:

$ xev -event keyboard
KeyPress event, serial 28, synthetic NO, window 0x5a00001,
    root 0x292, subw 0x0, time 354948359, (85,132), root:(86,150),
    state 0x10, ==>keycode 24<== (keysym 0x71, q), same_screen YES,
    XLookupString gives 1 bytes: (71) "q"
    XmbLookupString gives 1 bytes: (71) "q"
    XFilterEvent returns: False

I tried turning key repeat off globally and then enabling it for some keys without luck, so seems you have to turn it off for all regular keys :( Some hints follows:

Print out all keycode mappings: xmodmap -pk. On my system I get a range of 8-255

Turn off repeat for all keycodes:

$ seq 8 255 | xargs -n 1 xset -r

Turn on for arrow keys: (range might be different for you)

$ seq 111 166 | xargs -n 1 xset r
Related Question