| Setting typematic rate at the text console. |
It took me so long to work out how to change the repeat rate of
my keyboard, I thought I make a note on it here. The command to do this is
kbdrate. A typical command is as follows: kbdrate -r 30 -d 250The available rates depend on the hardware. This command is useful when you swap over your keyboard while the computer is running. Then the rate goes back to some slow rate such as 10 characters per second. I prefer 30 characters per second. The above command sets the rate to 30 characters per second after a delay of 250 milliseconds. If you try to run the program as an ordinary user, you get this: ak@emu> /sbin/kbdrate -r 30 -d 250 Cannot open /dev/port: Permission deniedBut if you run as user root, you get this: root@emu# /sbin/kbdrate -r 30 -d 250 Typematic Rate set to 30.0 cps (delay = 250 ms) On SuSE 9.0, the location is /bin/kbdrate: shark:~ # /bin/kbdrate -r 30 -d 250 Typematic Rate set to 30.0 cps (delay = 250 ms) See also the linux keyboard/console HOWTO, including this programming hint. |
| Setting typematic rate in SuSE 9.0 YaST. |
|
2004-6-5:
For SuSE 9.0, you can change the typematic rate in YaST.
Select System on the left. Select Select Keyboard Layout on the right. Select Expert Settings. Set 30 for Repeat Rate. Set 250 for Delay before Repetition Starts. Click OK. Click Accept. The file /etc/sysconfig/keyboard then contains these lines (among others): # Keyboard repeat rate (2.0 - 30.0) # Keyboard delay time in ms (250, 500, 750, 1000) # (If you want "kbdrate" to be executed, you have to set both of them.) # KBD_RATE="30" ## Type: integer ## Default: KBD_DELAY="250"So it looks like you have to set both of the values. In the file /etc/init.d/kbd you will see this: if test -n "$KBD_RATE" -a -n "$KBD_DELAY" -a ! "$MACHINE" = "mac" ; then
#echo -n "Setting keyboard repeat rate $KBD_RATE and delay time $KBD_DELAY"
echo -n "Keyboard: "
/bin/kbdrate -r $KBD_RATE -d $KBD_DELAY
rc_status -v1
fi
So it's true. You do have to set both the rate and delay values.
My reading of the /etc/init.d/kbd script is that you can't update the keyboard rate by running /etc/init.d/kbd restart or anything like that. So you have to run kbdrate -r 30 -d 250 directly. The new values set in YaST should work next time you re-boot the machine.
2004-6-5:
I re-booted my SuSE 9.0 machine after I set the keyboard typematic rate in
/etc/sysconfig/keyboard using YaST as above. But very sadly it doesn't
seem to work. Maybe there's something in KDE which converts the rate back to
slow values again. This requires further (frustrating) research. The evidence of
the 2004-6-13: With the above settings in the /etc/sysconfig/keyboard file, I get this at boot time: root@shark# fgrep Keyboard /var/log/boot.msg doneKeyboard: Typematic Rate set to 33.3 cps (delay = 250 ms)Now I have to work out why it's using 33.3 instead of 30 for the characters per second. It would be nice if things were set up to work correctly by SuSE instead of requiring so much research and trial-and-error. Some day, someone will work out how to set up linux to just work! |