Setting Up a Macropad for GitHub Copilot on Linux

EM Mini Pad is a compact five-key aluminium pad with a knurled knob. Linux can remap it by device, leaving just enough room for Copilot's core suggestion controls.

What is Linux-specific about this setup?

Copilot's editor commands are broadly similar across supported platforms. The Linux-specific work is identifying the pad and converting its raw inputs into spare keys. keyd can target a particular device through the Linux input layer.

Use its monitor to record the identifier and key codes. Map one position, reload the configuration and confirm that your main keyboard still behaves normally before adding the rest.

How do you remap the keys with keyd?

Choose spare function keys or uncommon combinations as outputs. Test them in a text field, then assign each output to a named Copilot command in the editor's Keyboard Shortcuts view. GitHub's reference lists commands for accept, dismiss, trigger, next and previous inline suggestions.

Keep the Linux map application-neutral. Let the editor attach meaning to each output. This avoids desktop-specific automation and makes the same pad usable in another program with a different local keymap.

Which Copilot actions fit a five-key block?

Use one key each for accept, dismiss, next, previous and trigger. If suggestions appear automatically, replace trigger with a command that opens the suggestion pane or leave the position unused. Make accept and dismiss physically distinct.

The knob can scroll or move through suggestions only if its events can be observed and mapped. Do not assume rotation works as a standard key until the monitor confirms it.

What about Copilot in the terminal?

This layout targets inline suggestions in an editor. Copilot CLI has its own interactive shortcuts and safety choices, so do not reuse the same labels without checking its current documentation. Context-specific editor bindings also stop acting when terminal focus takes over.

The EM Mini Pad is enough for one clear Copilot group. Save the device identifier, Linux output and editor command in a small table, and review the map whenever the editor or remapper changes. Retest all five inputs after a major desktop or editor upgrade. If one fails, confirm the Linux output first, then inspect the editor command instead of changing both layers at once. Keep a second keyboard connected while editing system input rules. Avoid wildcard device matches because they can change keys on hardware you never intended to remap. The smallest working configuration is the safest one to maintain. Store a known-good copy outside the active configuration directory, with a short note explaining each output for future repairs.

Back to blog