I'd like an especially high repeat rate and low delay on my backspace key, but a regular delay and rate on every other key. This command works, but sets it for every key:

xset r rate 120 30

Is there a way to have different settings for individual keys?

  • xset r 22 r rate 120 30 should do what you're looking for but at my laptop it doesn't work. The keycode for backspace is 22 though.
    – turbo
    Sep 25, 2012 at 11:28
  • That command appears to turn the backspace key on, and then set every key to have a given rate. It(and the similar 'xset -r 22 r 120 30') didn't set only the backspace key to have that rate. Sep 26, 2012 at 16:30

2 Answers 2


I think the answer to your question is no, there is no way to achieve this short of modyfying the X.org sources.

Here is an explanation why xset won't work; I am creating an answer because it corresponds to comments found in both the OP and the answer above.

xset r has several alternative ways of being called. Mutually exclusive, that is:

xset r 22

..will turn the repeating for keycode 22 (backspace) on, while xset -r 22 will turn it off.

Alternatively, it is possible to specify keyboard rates, but only for all keys:

xset r rate [num1 [num2]]

You cannot combine the two.

As for the 08 / 22 confusion: 08 is the ASCII code for the ASCII character backspace, and 22 is the X windows keycode for the particular physical key.

Unfortunately, the two settings (rate / delay and per-key repeat on-off) are handled by two different X extensions:

  • "rate/delay" is handled by the XF86Misc extension. xset changes the rate / delay using function XF86MiscGetKbdSettings( display, values ). The values XF86MiscKbdSettings structure contains only fields for repeat rate and delay (and two others of no importance here), and there is no way of applying it but general.
  • the "per key on-off" is controlled by the XKB extension. The XKB extension allows to control selected keys, but the structure that holds information on these keys only contains a field that can take one of three values: default, no repeat, repeat.

In short, this seems to be impossible to achieve in the current X.org setup.

  • 1
    Thanks for this answer. I'm likely going to turn repeating off for all keys, and selectively enable it for backspace/arrow keys. Sep 28, 2012 at 17:10


xset r 8 rate 120 30

The the xset manpage at www.x.org gives some help on the command. I also found Keyboard Keys and Key Code Values, which is on Adobe's website but I think that the key codes should be correct.

  • everywhere that I have looked says that the keycode for backspace is 8
    – Malachi
    Sep 27, 2012 at 19:36
  • If you enter xev in the terminal and then press backspace it will say that the keycode is 22.
    – user76204
    Sep 27, 2012 at 19:53
  • some of the sites that I have looked at don't give the key that is assigned to 22, and others say that 22 is the Page Down key. unfortunately I am not close to my Linux box to be able to test any of this.
    – Malachi
    Sep 27, 2012 at 20:02
  • You can use xev to find out what the keycodes are on your own system; press a key on your keyboard and it will give you the keycode.
    – user76204
    Sep 27, 2012 at 20:07
  • I am on Windows right now
    – Malachi
    Sep 27, 2012 at 20:16

You must log in to answer this question.

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