Setting Up a USB Foot Pedal on Linux

Four ribbed controls sit in one row on Four-Key Foot Pedal, a broad metal base connected by USB. Linux tools can reveal exactly what it sends before keyd translates those events into useful controls.

How do you see what the pedals send with evtest?

Connect the pedal, run evtest with permission to read Linux input devices and choose the new event device from its list. Press and release each position separately. Record the event type, code and value, including whether a held pedal repeats. The Linux input documentation identifies evtest as a tool for examining event devices.

Compare the device list before and after reconnecting. A pedal can present one or more interfaces, and its physical shape does not prove that Linux sees four ordinary keys. Do not choose a device by event number alone because numbering can change across boots.

How do you remap the pedals with keyd?

Run keyd monitor to obtain keyd's device identifier and key names. Create a dedicated configuration whose [ids] section contains only that pedal identifier. Add simple mappings under [main], validate the file with keyd check and reload the daemon after it passes.

Begin with one harmless output such as Escape. Keep another keyboard attached and remember keyd's documented panic chord of Backspace, Escape and Enter. A narrow device match prevents the same source key on the main keyboard from being rewritten.

Do foot pedals work under Wayland?

Basic keyd mappings operate at the Linux input layer and create a virtual device, so they are not tied to X11. That makes ordinary substitutions available under Wayland and even at a text console. Application-specific behavior is a separate problem because active-window detection depends on the desktop environment.

Let keyd produce neutral spare keys, then map those inside the terminal, editor or voice application. This boundary is easier to debug than asking a system daemon to infer application focus or launch arbitrary commands.

What are good bindings for four terminal pedals?

Push-to-talk, Escape, previous history and next history form a reversible starting set. Confirm both press and release for push-to-talk so a lost key-up event cannot leave recording active. Keep Enter, command execution, deletion and acceptance actions away from the floor.

The Four-Key Foot Pedal provides four wide targets, but fewer mappings may be better. Label the physical order, keep the evtest record with the configuration and retest every position after changing USB ports, connection paths or the keyd version. Store the original event names too, since they are the fastest way to tell a hardware change from a broken keyd destination.

Back to blog