# Keyboard delay and repeat rate in Arch Linux

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:

```bash
xset q
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1754025411052/274a891c-fe18-4ae2-87f6-887dd1e7b122.png align="center")

Look for the section that shows:

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

*This confirms your current config.*

Run this in your terminal:

```bash
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`:

```bash
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:
    
    ```bash
    sudo nano /etc/systemd/system/kbdrate.service
    ```
    

Paste this:

```bash
[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
```

2. Enable and start the service:
    
    ```bash
    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.
