Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

71%
+3 −0
Q&A 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 sett...

0 answers  ·  posted 1y ago by mcp‭  ·  edited 1y ago by Quasímodo‭

Question console x11 keyboard
#3: Post edited by user avatar Quasímodo‭ · 2023-02-25T17:17:38Z (about 1 year ago)
keyboard-rate is too specific of a keyword, suggesting simply keyboard instead.
#2: Post edited by user avatar mcp‭ · 2023-02-24T18:11:40Z (about 1 year ago)
Add file path
  • # 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 by user avatar mcp‭ · 2023-02-24T17:56:18Z (about 1 year ago)
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.