Keyboard delay and repeat rate in Arch Linux

shkzshkz
2 min read

If your keyboard feels sluggish when holding down a key, like when scrolling through an Alacritty or Kitty terminal, or moving around in Visual Studio Code or a text editor, it’s probably because of the default typematic delay and repeat rate settings.

Arch gives you full control over this. Here’s how to make your keyboard feel more responsive in both graphical (X11) sessions and the TTY console.

What are we changing?

  • Delay: Time (in ms) before a key starts repeating when you hold it down.

  • Rate: How many times per second it repeats once it starts.

Default settings are usually slow, around 500 ms delay and 25 Hz rate. Personally, I use xset r rate 200 40 as my current configuration and find it to be a great balance of speed and control. I prefer something like 200 ms delay and 40 Hz rate for a smoother experience.

X11 (Graphical Session)

You can check your current keyboard repeat settings with:

xset q

Look for the section that shows:

Keyboard Control:
  auto repeat delay:  200    repeat rate:  40

This confirms your current config.

Run this in your terminal:

xset r rate 200 40

This sets a 200ms delay and 40 key repeats per second.

Make it permanent

In my case, I added it to ~/.xprofile so it runs automatically when I log in.

TTY (Console without X)

For the TTY (Ctrl+Alt+F2 style consoles), use kbdrate:

sudo kbdrate -d 200 -r 40

This won’t survive a reboot, so let’s create a persistent systemd service.

  1. Create the service file:

     sudo nano /etc/systemd/system/kbdrate.service
    

Paste this:

[Unit]
Description=Set keyboard delay and repeat rate for TTY

[Service]
Type=oneshot
ExecStart=/usr/bin/kbdrate -d 200 -r 40

[Install]
WantedBy=multi-user.target
  1. Enable and start the service:

     sudo systemctl enable --now kbdrate.service
    

Done

That’s it. One small tweak and your system feels faster and more responsive. No extra packages, just native tools. Drop it into your dotfiles and forget about it.

0
Subscribe to my newsletter

Read articles from shkz directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

shkz
shkz

I am shkz, a Security Researcher, Red Team and CTF Player.