rvaiya/keyd logo

rvaiya/keyd

Free

A key remapping daemon for linux.

FreeFree tier
Type
Open Source

About rvaiya/keyd

keyd is a flexible system-wide key remapping daemon for Linux. It uses kernel-level input primitives (evdev, uinput) to remap keys, overcoming the limitations of existing tools like xcape and xmodmap that are tied to specific environments like X11. keyd offers a hand-tuned input loop in C that achieves sub-millisecond latency. Unique features include layers with hybrid modifiers, key overloading (different action on tap vs hold), keyboard-specific configuration, instantaneous remapping without flashing, a client-server model for scripting and application-specific remapping (supporting X, sway, and GNOME Wayland), system-wide config that works in a virtual terminal, first-class modifier overloading, and Unicode support. The configuration format is intuitive and easy to grok.

Key Features

Layers with support for hybrid modifiers
Key overloading (different behavior on tap vs hold)
Keyboard-specific configuration
Instantaneous remapping (no flashing firmware)
Client-server model for scripting and application-specific remapping
System-wide config works in a virtual terminal (VT)
First-class support for modifier overloading
Unicode support
Hand-tuned input loop in C with ~1ms latency

Pros & Cons

Pros
  • System-wide remapping works in VT and across display servers
  • Low latency input handling (hand-tuned C loop, ~1ms)
  • Flexible layers and key overloading (like QMK but for any keyboard)
  • No need to flash firmware; changes apply instantly
  • Free and open source (MIT license)
  • Intuitive configuration format
  • Supports keyboard-specific configurations
  • Client-server model allows scripting and integration with other tools
Cons
  • Linux-only (relies on evdev/uinput kernel primitives)
  • Requires a C compiler and Linux kernel headers for compilation
  • Not a tool for programming individual key up/down events
  • Optional dependencies (python, python-xlib) needed for application-specific remapping on X
  • Configuration syntax may have changed between v1 and v2 (migration guide available)

Best For

Experimenting with custom layers and oneshot modifiersUsing multiple keyboards with different layouts on the same machineRemapping keys like Ctrl-1 without breaking modifier semanticsSwapping Caps Lock and Escape keysSystem-wide key remapping across X11, Wayland (sway, GNOME), and VTApplication-specific key mapping via scripting

FAQ

How do I install keyd?
Clone the repository (git clone https://github.com/rvaiya/keyd), run make, then sudo make install, and enable the service with sudo systemctl enable --now keyd.
What are the dependencies for keyd?
A C compiler and Linux kernel headers (already present on most systems). Optional dependencies for application-specific remapping include python and python-xlib (for X) or dbus-python (for KDE).
Does keyd work in Wayland?
Yes, keyd supports Wayland through its client-server model. It ships with support for X, sway, and GNOME (Wayland), and is display-server agnostic.