Post History
Problem I want to set a global keyboard rate for both the X session and the console that persists for external keyboards, across plug-ins and removals. To my understanding, Xorg and console sett...
#2: Post edited
- # Problem
- I want to set a global keyboard rate for both the X session and the
- console that persists for external keyboards, across plug-ins and
- removals. To my understanding, Xorg and console settings have to be
- configured independently.
- Ideally, I'd like to disable repeat rate entirely, which is why the
- delays in my snippets are so long.
- I seem to have a working solution for the X session, but not for the
- console. The X session solution does not actually disable the keyboard
- repeat; I'd like it to.
- ## Console
- I have a [`systemd`
- service for setting the keyboard rate in the
- console](https://wiki.archlinux.org/title/Linux_console/Keyboard_configuration#Systemd_service), which I have enabled:
- ```txt
- /etc/systemd/system/kbdrate.service
- -
- [Unit]
- Description=Keyboard repeat rate in tty.
- [Service]
- Type=oneshot
- RemainAfterExit=yes
- StandardInput=tty
- StandardOutput=tty
- ExecStart=/usr/bin/kbdrate -d 1000 -r 2
- [Install]
- WantedBy=multi-user.target
- ```
- This works, until I unplug and replug the keyboard.
- ## Xorg
- I set this in my `.xinitrc`:
- ```txt
- xset r off
- ```
- which works, until I unplug and replug the keyboard.
- [The persistent
- method](https://wiki.archlinux.org/title/Xorg/Keyboard_configuration#Using_AutoRepeat_configuration_option)
- seems to be:
- ```txt
- Section "InputClass"
- Identifier "keyboard-rate"
- MatchIsKeyboard "on"
- Option "AutoRepeat" "5000 5000"
- EndSection
- ```
- I am not aware of how to actually disable repeat rate from this config,
- so I am using a long delay and interval. I would love a solution to
- this.
- # Problem
- I want to set a global keyboard rate for both the X session and the
- console that persists for external keyboards, across plug-ins and
- removals. To my understanding, Xorg and console settings have to be
- configured independently.
- Ideally, I'd like to disable repeat rate entirely, which is why the
- delays in my snippets are so long.
- I seem to have a working solution for the X session, but not for the
- console. The X session solution does not actually disable the keyboard
- repeat; I'd like it to.
- ## Console
- I have a [`systemd`
- service for setting the keyboard rate in the
- console](https://wiki.archlinux.org/title/Linux_console/Keyboard_configuration#Systemd_service), which I have enabled:
- ```txt
- /etc/systemd/system/kbdrate.service
- -
- [Unit]
- Description=Keyboard repeat rate in tty.
- [Service]
- Type=oneshot
- RemainAfterExit=yes
- StandardInput=tty
- StandardOutput=tty
- ExecStart=/usr/bin/kbdrate -d 1000 -r 2
- [Install]
- WantedBy=multi-user.target
- ```
- This works, until I unplug and replug the keyboard.
- ## Xorg
- I set this in my `.xinitrc`:
- ```txt
- xset r off
- ```
- which works, until I unplug and replug the keyboard.
- [The persistent
- method](https://wiki.archlinux.org/title/Xorg/Keyboard_configuration#Using_AutoRepeat_configuration_option)
- seems to be:
- ```txt
- /etc/X11/xorg.conf.d/00-keyboard.conf
- -
- Section "InputClass"
- Identifier "keyboard-rate"
- MatchIsKeyboard "on"
- Option "AutoRepeat" "5000 5000"
- EndSection
- ```
- I am not aware of how to actually disable repeat rate from this config,
- so I am using a long delay and interval. I would love a solution to
- this.
#1: Initial revision
How to persist keyboard repeat rate and delay for external devices
# Problem
I want to set a global keyboard rate for both the X session and the
console that persists for external keyboards, across plug-ins and
removals. To my understanding, Xorg and console settings have to be
configured independently.
Ideally, I'd like to disable repeat rate entirely, which is why the
delays in my snippets are so long.
I seem to have a working solution for the X session, but not for the
console. The X session solution does not actually disable the keyboard
repeat; I'd like it to.
## Console
I have a [`systemd`
service for setting the keyboard rate in the
console](https://wiki.archlinux.org/title/Linux_console/Keyboard_configuration#Systemd_service), which I have enabled:
```txt
/etc/systemd/system/kbdrate.service
-
[Unit]
Description=Keyboard repeat rate in tty.
[Service]
Type=oneshot
RemainAfterExit=yes
StandardInput=tty
StandardOutput=tty
ExecStart=/usr/bin/kbdrate -d 1000 -r 2
[Install]
WantedBy=multi-user.target
```
This works, until I unplug and replug the keyboard.
## Xorg
I set this in my `.xinitrc`:
```txt
xset r off
```
which works, until I unplug and replug the keyboard.
[The persistent
method](https://wiki.archlinux.org/title/Xorg/Keyboard_configuration#Using_AutoRepeat_configuration_option)
seems to be:
```txt
Section "InputClass"
Identifier "keyboard-rate"
MatchIsKeyboard "on"
Option "AutoRepeat" "5000 5000"
EndSection
```
I am not aware of how to actually disable repeat rate from this config,
so I am using a long delay and interval. I would love a solution to
this.
