Skip to content

Keymaps & Layers

What are layers?

Layers work like the Shift key but for your entire layout. You can define multiple complete keymaps and switch between them with a dedicated key. PolyKybd’s per-key displays make layers instantly visible — every key shows its current function on the active layer.

PolyKybd uses QMK’s dynamic keymap (VIA-compatible) with 9 layers, so remaps can be written to the keyboard at runtime without recompiling.

Where the keymap lives

The shared keymap logic (rendering, HID handling, language selection, and the QMK callbacks) is in:

keyboards/handwired/polykybd/poly_keymap.c

Each variant’s default keymap data — the keymaps[] array and encoder_map[] — is in its own variant directory:

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

Both live in the PolyKybd firmware repo. See Keyboard Variants for why the logic is shared.

Customizing with PolyKybdHost

The easiest way to remap keys is through the PolyKybdHost keymap editor, which writes changes directly to the keyboard’s dynamic keymap without needing to recompile firmware:

  1. Open PolyKybdHost (system tray icon → Layout Editor)
  2. Click any key to select it
  3. Choose the new keycode from the browser
  4. The change is written immediately to the keyboard

See Keymap Editor for details.

Customizing in QMK source

For deeper changes (new layers, macros, tap-dance), edit the variant’s keymap.c directly. The keymaps[] array is data only:

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_ESC, KC_1, KC_2, /* ... */
),
[1] = LAYOUT(
/* function layer */
),
};

Then rebuild and flash the firmware (target handwired/polykybd/split72 or /split42).

QMK’s full keycode reference is at docs.qmk.fm/keycodes. Everything documented there works on PolyKybd.

Layer indicator on the status display

The status OLED shows the current active layer, along with other status information like the unicode input mode and host OS selection.