3

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

Léo Léopold Hertz 준영
  • 6,788
  • 29
  • 91
  • 193
  • 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 Sep 03 '16 at 09:48
  • @Random832 Great proposal! I added it to the differential solutions wthere I would like know how well it can work if you have many rapid changes in directions of arrow-keys. Etc how much it decreases the natural typing. – Léo Léopold Hertz 준영 Sep 03 '16 at 10:19

2 Answers2

4

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
olejorgenb
  • 881
  • 11
  • 11
  • Can you give an example what is the keycodes for arrow-key-left and apply it for your last command, please. – Léo Léopold Hertz 준영 Sep 15 '16 at 19:58
  • @Masi on my system the arrow-key-left keycode is 113. (but I think it might vary with systems) So the command to turn on repeat for the left key would be `xset r 113` It is not working? – olejorgenb Sep 17 '16 at 04:09
  • 1
    Hm, try to enable keyrepeats in the tool displayed in the screenshot of the questions (if you haven't already). Having that setting disabled probably is the same as "turning key repeat off globally and then enabling some keys" – olejorgenb Sep 18 '16 at 19:58
  • Yes, but when I tried that on my system it unfortunately didn't work. – olejorgenb Sep 19 '16 at 15:50
  • 1
    Did you try `seq 8 255 | xargs -n 1 xset -r` and then turn on just the arrow keys? – olejorgenb Sep 19 '16 at 19:58
  • The following works on my system: `xset r on && seq 8 255 | xargs -n 1 xset -r && seq 111 166 | xargs -n 1 xset r` I don't run any desktop-settings-daemon though. If it doesn't work for you it might be some gnome stuff interfering. – olejorgenb Sep 19 '16 at 21:53
  • Where "works" means "only the arrow keys have repeat-on-hold on" – olejorgenb Sep 19 '16 at 21:54
  • Yes, but my system does not have an effect on it with the work flow. – Léo Léopold Hertz 준영 Sep 20 '16 at 04:27
  • IIRC PS/2 keyboards implemented the repeat on the keyboard itself, so if you turned it off from the keyboard, it was off completely. Ignoring repeats for certain keys would be possible on software, though. I wouldn't be surprised if the current state of affairs was at least partly due to that legacy. – ilkkachu Sep 24 '16 at 09:22
  • FTR, `xset -r 38` on my stock Debian 10 (i.e. wayland, gnome3, and whatnot) doesn't turn off the repeat of the 'a' key in the terminal window, but it does in chromium. something that has no consistent effect across the board is not very useful. – Attila Lendvai Nov 25 '19 at 11:29
0

You cannot enable just some key-repeats when all key-repeats of all keys are already disabled. I could not confirm the claims which says it is possible.

Léo Léopold Hertz 준영
  • 6,788
  • 29
  • 91
  • 193