Saturday, April 19

Calibrating the keyboard autorepeat setting

The default keyboard autorepeat setting on most systems is boringly slow. Even worse, the delay before autorepeat kicks in is so long. This is great for novice users, but we programmers deserve better. Here's a calibration procedure that I use:

  • The autorepeat delay should be as short as possible, but a concentrated, damp but short keypress should not cause multiple keypress events.
  • To determine the most suitable autorepeat rate, test your accuracy. Open an editor and try to enter multiple lines of about 50 characters using the autorepeat feature. Pick the highest setting with which you can consistently get the line length within 2-3 characters of the target. (The 2-3 character margin comes from the practice of releasing the autorepeated key a little early and entering the remaining 1-3 characters, if any, with separate keystrokes.)

For me an autorepeat delay of ~250ms and 80 char/s rate works well. To get your numbers, you can use the command xset q | grep 'repeat rate' .

This tweak make the standard direction keys (and particularly the backspace & delete keys) much more useful: you can frequently get away without using special editor commands or, say, having to select things to delete them and thus resetting the X buffer. It makes things a little faster and more responsive. Try reverting to the standard setting after a few weeks of fast repeat to feel the difference.


Anonymous said...

what tweak? where do you do these calibrations at? useless information here without giving something tangible!

Ryan Phelps said...

I have to agree that the default keyboard autorepeat setting on most systems is so slow. Your tips are very helpful especially to programmers.