kbdrate
Adjust keyboard repeat rate and delay
SYNOPSIS
kbdrate [-h] [-s] [delay [rate]]
PARAMETERS
-h, --help
Display help message and exit.
-s, --silent
Do not print current delay and rate values.
delay
Autorepeat delay in milliseconds (e.g., 250).
rate
Autorepeat rate in characters per second (e.g., 30).
DESCRIPTION
The kbdrate command adjusts the Linux kernel's keyboard autorepeat behavior, controlling the delay before a held key starts repeating and the speed of repetition. This is useful for customizing typing experience, such as faster rates for programmers or slower for precision work.
When invoked without arguments, it displays the current delay (in milliseconds) and rate (characters per second). Providing one or two numeric arguments sets new values: first for delay, second for rate. Changes apply immediately to the console keyboard driver (PS/2 or USB via evdev) but only on the current TTY and require root privileges.
It interacts directly with the kernel via ioctl(KIOCSKBRATE), affecting raw keyboard input before any desktop environment processing. Graphical sessions (X11, Wayland) typically override these with their own settings via xset or libinput. Ideal for server consoles, embedded systems, or local TTY use.
Valid delay values are typically 200-4000 ms; rates 8-60 cps, though kernel limits apply (often delay quantized to 250/500/750/1000 ms). Non-persistent across reboots or user switches.
CAVEATS
Requires root privileges to set values (use sudo). Affects only active console/TTY, ignored in X11/Wayland. Changes lost on reboot or keyboard reset. Kernel may clamp invalid values.
EXAMPLES
kbdrate
Prints current settings.
sudo kbdrate 250 40
Sets fast repeat: 250ms delay, 40 cps.
sudo kbdrate -s 500 20
Sets silently: 500ms delay, 20 cps.
TYPICAL DEFAULTS
Delay: 660 ms; Rate: 15 cps (varies by distro/kernel).
HISTORY
Originally from the kbd package for Linux console tools (early 1990s). Integrated into util-linux since version 2.13 (2008). Evolved with USB keyboard support via input subsystem.
SEE ALSO
loadkeys(1), setkeycodes(8), kbdinfo(8), setleds(8)


