Remapping Macropad Keys With keyd on Linux

EM Mini Pad is a small, heavy anodised aluminium block with five keys and a knurled knob. keyd can isolate its Linux input events and remap them below the desktop environment.

Why use keyd instead of desktop keyboard settings?

keyd works with Linux input primitives and produces a virtual input device. Its core mappings persist across Wayland, X11 and a text console, so a basic pad layout is not tied to one compositor's shortcut screen. That is useful for Escape, modifiers, navigation keys and other substitutions needed in several environments.

This reach also raises the cost of a bad rule. The keyd manual warns that an incorrect configuration can make a keyboard unusable and documents a panic sequence of Backspace, Escape and Enter to stop the daemon. Keep another input device connected and learn that recovery route before changing essential keys.

How do you scope a config to only the macropad?

Run keyd monitor, connect the pad and press its controls. The output supplies the device identifier needed by the configuration. Create a dedicated file in keyd's configuration directory with an [ids] section containing that identifier, followed by a [main] section for mappings.

Do not use a wildcard for a one-pad setup. A wildcard can catch the built-in keyboard or another keyboard-like accessory. Current keyd supports a more specific identifier format when devices share vendor and product values, so use the exact monitor output rather than trimming it to an example found elsewhere.

How do you find the key names to remap?

The monitor command prints key events and names, while keyd list-keys lists valid destination names. Observe press and release behavior for each pad position. If keyd is already running, its monitor can show processed output; the official quickstart notes that stopping the daemon reveals original input events when that distinction matters.

Validate configuration files with keyd check before reloading them. Then reload the service and test one harmless mapping in a text field. Inspect the service log for parse errors instead of repeatedly editing several rules at once.

What are the limits compared with on-pad remapping?

keyd is system software, so the remap stays on that Linux machine. A firmware-level layout can travel with compatible hardware. keyd also intentionally avoids executing arbitrary programs as root; compositor or application shortcuts are a better layer for launching commands.

The EM Mini Pad also supports wired USB-C and Bluetooth, with a listed 1000 mAh battery. Identify it separately in each connection mode because Linux may present different device records. Keep the keyd file small, version it and retain a plain-key fallback for recovery.

Back to blog