keyd
Remap keyboard keys and create macros
TLDR
Start and enable the keyd service
Display keypress information
Reset bindings and reload the configuration files in /etc/keyd
List all valid key names
Check the detected configuration files for errors
Create a temporary binding
SYNOPSIS
keyd [OPTIONS] | keyd
PARAMETERS
-c, --config PATH
Specify alternative config file path (default: /etc/keyd/default.conf)
-s, --socket PATH
Runtime control socket path (default: /run/keyd/socket)
-l, --log-level LEVEL
Set logging verbosity: off|error|info|debug
-d, --daemonize
Daemonize after startup (default behavior)
-u, --user USER
Drop root privileges to USER after binding devices
-m, --mode MODE
Input mode: auto|xi1|evdev|fallback (auto-detects)
-h, --help
Display help and exit
reload
Reload configuration without restarting daemon
monitor
Monitor and print key events in real-time
status
Print daemon status and active layer
DESCRIPTION
keyd is a keyboard daemon for Linux that enables complex, stateful key remapping and macro definitions. Unlike traditional tools like xmodmap or setxkbmap, keyd supports layered layouts, where keys change behavior based on single modifiers, key sequences, or timeouts. It intercepts keyboard events at a low level via libinput or evdev, allowing overrides for any key without altering the base XKB layout.
Primarily designed for gaming keyboards and power users, keyd shines in handling combos like hyper+key layers or mouse button emulation from keys. It works seamlessly on both X11 and Wayland, daemonizing as root to grab /dev/input/* devices. Configuration is done via a simple keyd.conf file with sections for layers and fallbacks.
keyd avoids polling by hooking into input subsystems, ensuring low latency. It's lightweight, with no persistent state beyond the runtime socket for runtime controls like reload.
CAVEATS
Requires root privileges to access input devices; may conflict with other input daemons like Plasma's kwin_wayland. Not compatible with udev hwdb rules for custom keyboards. On some systems, needs logind inhibit or systemd service for persistence.
CONFIGURATION EXAMPLE
[ids] * [main] capslock = overload(control, escape) touchpad = toggle [control] touchpad = mouse Install via: make && sudo make install
HISTORY
Developed by rvaiya starting in 2020 on GitHub as a response to libinput's limitations on modifier taps and combos. Initial release v1.0.0 in 2021; now at v2.x with Wayland/evdev backend improvements and macro scripting.


