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:
| Route | Best for | Recompile? | Survives a reflash? |
|---|---|---|---|
| 1. PolyKybdHost Layout Editor | Remapping individual keys, quickly | No | Yes — kept in the keyboard’s EEPROM* |
| 2. QMK firmware source | Permanent keymaps, layers, macros — and behaviour beyond the keymap | Yes | Yes — 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.ckeyboards/polykybd/split42/keymaps/default/keymap.cThe 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.
-
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 -
Make the change in
keymaps[](each layer is aLAYOUT_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) orTG(n)(toggle). QMK’s keycode reference is at docs.qmk.fm/keycodes.These need firmware logic, not just data — implement them via the QMK callbacks and reference them from
keymaps[]. This is exactly what makes route 2 worth it. See Firmware Development. -
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.