Where is the default repeat rate for xset stored

keyboardxorgxset

If I set keyboard repeat rate with say xset r rate 250 100, disconnect my usb keyboard and then run xset -q, I can see that after disconnecting the keyboard repeat rate is automatically set to the following default values:

$ xset -q | grep delay
  auto repeat delay:  660    repeat rate:  25

Can I change the default values? Where are they stored? I'm running Debian Sid.

Best Answer

You can change the so-called seat-defaults in /etc/X11/xinit/xserverrc by adding the relevant parameters (cf. XSERVER(1)).

-ardelay milliseconds
   sets the autorepeat delay (length of time in milliseconds that a key must be depressed before autorepeat starts).

-arinterval milliseconds
   sets the autorepeat interval (length of time in milliseconds that should elapse between autorepeat-generated keystrokes).

(!) For figuring out the arinterval in ms from xset repeat frequency, compute 1000/freq.

Mine now says exec /usr/bin/X -nolisten tcp -ardelay 200 -arinterval 20 "$@"

[found on https://superuser.com/questions/935801/whenever-i-plug-in-another-keyboard-key-repeating-rate-is-reset-to-some-value]

(I used to try to make the repeat rate permanent by setting Option "AutoRepeat" "190 70" /etc/X11/xorg.conf.d/keyboard.conf, but that wouldn't stick, so I (helplessly) resorted to running a per-minute xset cron job XD)

Related Question