Skip to content
/ wxkbd Public

X11 key repeat settings daemon

License

Notifications You must be signed in to change notification settings

wlhlm/wxkbd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wxkbd - X key repeat settings daemon

This daemon applies key repeat rate and delay settings to keyboards connected to an X server.

This was born out of the lack of proper tools for setting key repeat rate and delay under modern X with XInput2 outside of Desktop Environments. Currently there are two options of configuring key repeat:

  • Using the X command line parameters -ardelay and -arinterval
  • Using xset r rate

The problem with the former is that it requires changing the X server command line which might not be supported by the display manager. The good thing is, that it applies the settings to newly plugged in keyboards as well, which the latter option does not. xset would have to be rerun each time a new keyboard is connected. X input developer Peter Hutterer describes the problem of the inadequacy of tools like xset or setxkbmap for modern X input in the linked blog post. In this bug report he suggests relying on the desktop environment for configuring X input devices or writing/using a daemon that applies the configuration continually when working outside of a DE. This is were wxkbd comes in. It listens for X input events and can:

  • Set key repeat rate and delay when a new keyboard is plugged in

After writing this program, I discovered similar daemons that you should check out too:

These are interesting, because they let you run arbitrary commands for X input events allowing for example to set keyboard layouts using setxkbmap, which wxkbd does not support.

Usage

$ wxkbd -h
Usage: wxkbd [-V] [-r rate] [-d delay]

Dependencies

  • libxcb

Build process

Just run make, which should produce a single executable wxkbd.

License

This software is under the terms of the MIT software license. More information can be found in the LICENSE file.