Skip to content

Edit the Keymap

This HowTo changes what the keys do. There are two routes — pick by how permanent the change is and how deep it goes:

RouteBest forRecompile?Survives a reflash?
1. PolyKybdHost Layout EditorRemapping individual keys, quicklyNoYes — kept in the keyboard’s EEPROM*
2. QMK firmware sourcePermanent keymaps, layers, macros — and behaviour beyond the keymapYesYes — it is the compiled default

Background on layers and the dynamic keymap is on Keymaps & Layers.

Route 1 — PolyKybdHost Layout Editor (runtime)

The fastest route. Right-click the PolyKybdHost tray icon → Configure Keymap, click a key, pick a keycode, and it’s written to the keyboard over HID immediately — no recompile. It writes a single key at a time (ID_DYNAMIC_KEYMAP_SET_KEYCODE) and the change persists across power cycles.

Full walkthrough and limitations: Keymap Editor.

Route 2 — QMK firmware source

Editing the firmware directly is the most powerful route: it does much more than remap keys — new layers, macros, tap-dance, encoder behaviour, and any custom QMK logic. It’s also the way to make your change the compiled default that ships with the firmware (rather than living only in the keyboard’s EEPROM), so it’s there on a fresh board and is what you share or upstream.

The keymap data — the keymaps[] array, g_led_config, and encoder_map[] — lives per-variant:

keyboards/polykybd/split72/keymaps/default/keymap.c
keyboards/polykybd/split42/keymaps/default/keymap.c

The shared keymap logic (rendering, HID handling, the QMK callbacks) is in keyboards/polykybd/poly_keymap.c. Both are in the qmk_firmware fork; see Keyboard Variants for why the logic is shared but the data is per-variant.

  1. Start from a copy so you can fall back to the default:

    Terminal window
    qmk new-keymap -kb polykybd/split72 -km my_keymap # or /split42
  2. Make the change in keymaps[] (each layer is a LAYOUT_left_right_stacked(...) of keycodes):

    Replace a keycode, or add another [n] = LAYOUT_left_right_stacked(...) entry (up to 9 layers) plus a key that reaches it — MO(n) (momentary) or TG(n) (toggle). QMK’s keycode reference is at docs.qmk.fm/keycodes.

  3. Rebuild and flash per Build & Flash from Source:

    Terminal window
    qmk compile -kb polykybd/split72 -km my_keymap

A keymap change lands on the per-key displays automatically — the firmware re-derives every legend from the active layer.

See Contributing if you want to upstream a keymap change.