Saturday, 22 March 2014

Keyboard auto-repeat

I figure that keyboard auto-repeat isn't always desirable.

Take a web browser for example. You press and hold the down button, and the page scrolls down, and then stops, and then starts again and continues scrolling until you lift the button.

It should be more like a video game: start scrolling down, smoothly, as soon as the key is depressed, and cease scrolling as soon as it is lifted.

In X11, the server sends events to programs - KeyPress and KeyRelease. If autorepeat is on many of these events are generated for one (physical) keypress. You can turn it off with "xset -r". I'd like to try only turning it on for the arrow keys, but there isn't an easy way to do this - you have to turn on autorepeat, and then turn it off for all keys except the ones you want to leave it on for.

No comments:

Post a Comment