Setting Up a Macropad for Cursor on Linux

EM Mini Pad is a small aluminium macropad with five keys and a knurled knob. On Linux, five device-specific bindings are enough for a focused set of Cursor Agent and review controls.

Does Cursor on Linux support custom keybindings?

Cursor provides Keyboard Shortcuts settings and says Cursor-specific commands can be remapped. Search the installed command list rather than copying a default chord from another operating system. The editor, terminal and chat panel each have their own focus context.

Choose command names first. Side-panel focus, cancel, command palette and chat navigation are safer starting points than accept-all changes. If you bind a command that applies edits, keep it physically separate and review the diff first.

How do you remap a small pad with keyd?

Use the keyd monitor to identify the pad and see what each position sends. Create a device-specific configuration so the same codes on your main keyboard stay unchanged. Map the first position to a spare function key, reload the configuration and confirm the result in a plain text field.

Repeat for the remaining keys, then assign those spare inputs in Cursor. This leaves Linux responsible for producing predictable keys and Cursor responsible for interpreting them. It is easier to audit than a remapper that launches editor commands directly.

Which Agent actions fit on five keys?

A sensible first group is open or focus Agent, cancel generation, escape from the current input, move to the next review item and open the command palette. Your actual set should reflect repeated work, not a generic diagram. Leave one key unused if only four actions earn a place.

The knob may support scrolling or another repeated movement if it reports usable events. Observe it before assigning anything. A rotation that the system does not expose cannot be fixed in Cursor's keybinding screen.

What is different under Wayland?

keyd remaps at the Linux input layer, so basic substitutions do not depend on an X11-only shortcut utility. Application-specific behaviour varies by desktop environment, which is why the clean route is a device map plus Cursor's own command bindings.

Keep recovery instructions available before changing a system-wide keyboard service. The EM Mini Pad can work over wired USB-C or Bluetooth, but wired mode is simpler while you identify inputs and debug the first layout. Save the device identifier and Cursor command names beside the configuration. If an update changes either layer, that record shows whether to inspect the Linux remap or the editor binding first. Retest the five controls after every major desktop or Cursor upgrade.

Back to blog