Prev | Current Page 168 | Next

Chris Tyler

"X Power Tools"

But if the keyboard repeats too easily
or too quickly, it can be very annoying. The X server permits keyboard repeat to
be individually enabled on a key-by-key basis, and the delay before keys start repeating
as well as the rate at which they repeat can be adjusted. These parameters are
adjusted using xset.
6.7
6.7 Adjusting the Mouse Acceleration 103
You can turn keyboard repeat off with the -r or r off options:
$ xset r off
$ xset -r
Likewise, you can turn it on with r or r on:
$ xset r on
$ xset r
To enable repeat for a specific key, find the keycode value using xev and use that as
an argument:
$ xset r 65 # spacebar will repeat
$ xset -r 65 # spacebar will not repeat
To adjust the repeat rate, the XKB extension must be loaded (which is the default for
most X servers). Execute xset with the r subcommand followed by the word rate,
the length of time in milliseconds that the key must be held down before it starts
repeating, and finally the repeat rate in Hz (with a maximum of 255).
For example, to repeat keys at the rate of 10 characters per second, starting 1 second
after a key is held down, enter the following code:
$ xset r rate 1000 10
To reset the repeat rate to the default settings:
$ xset r rate
The default settings are a 660 ms delay and a 25 Hz repeat rate.


Pages:
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180