Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 2608  / 3 Years ago, tue, august 31, 2021, 3:33:06

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?


More From » xorg

 Answers
3

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.


[#35451] Tuesday, August 31, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ravturtl

Total Points: 335
Total Questions: 132
Total Answers: 110

Location: Tanzania
Member since Wed, Feb 24, 2021
3 Years ago
;