Skip to content

Go60: fix physical layout key order; make ZMK Studio buildable in the nix pipeline - #44

Open
andrewklingelhofer wants to merge 2 commits into
moergo-sc:mainfrom
andrewklingelhofer:go60-studio-fixes
Open

Go60: fix physical layout key order; make ZMK Studio buildable in the nix pipeline#44
andrewklingelhofer wants to merge 2 commits into
moergo-sc:mainfrom
andrewklingelhofer:go60-studio-fixes

Conversation

@andrewklingelhofer

@andrewklingelhofer andrewklingelhofer commented Jul 16, 2026

Copy link
Copy Markdown

Summary

Two fixes discovered while building and running a ZMK Studio-enabled Go60 firmware (CONFIG_ZMK_STUDIO=y) via the nix/Docker pipeline from go60-zmk-config:

1. Go60 physical layout key order (go60-layouts.dtsi)

The physical layout listed the last nine keys as left bottom-corner → six thumbs → right bottom-corner, but the matrix transform (and therefore keymap binding order) is left bottom-corner → right bottom-corner → thumbs. Physical layout keys map to bindings by index, so ZMK Studio rendered the right bottom-corner bindings on the first three thumb keys and shifted all thumb bindings onto the wrong keys. Rows 1–4 were unaffected, making the result look almost-but-not-quite right.

2. Studio dependencies missing from the nix build (nix/zmk.nix)

Building with CONFIG_ZMK_STUDIO=y failed in three successive ways, all packaging gaps rather than code issues:

  • ZMK_STUDIO_RPC selects NANOPB, but the nanopb module wasn't in requiredZephyrModules → Kconfig abort
  • the zmk-studio-messages module (proto sources) was also absent → ZEPHYR_ZMK_STUDIO_MESSAGES_MODULE_DIR empty, ninja failed on /proto/zmk/*.proto
  • the nanopb generator needs pkg_resources, python protobuf, and a protoc at build time → added setuptools, protobuf, grpcio-tools to the python environment

Both modules were already pinned in nix/manifest.json / app/west.yml; they just weren't passed to the build. Non-Studio builds are unaffected.

Testing

  • Built go60_lh/go60_rh with CONFIG_ZMK_STUDIO=y through the Docker/nix pipeline
  • Flashed both halves of a production Go60; keyboard functions normally (BLE, split link, trackpads)
  • Connected ZMK Studio over BLE (GATT transport), unlocked via &studio_unlock, and confirmed live keymap edits apply
  • Confirmed the physical layout mismatch on-screen before the fix and the corrected 1:1 mapping after

The physical layout listed the last nine keys as: left bottom-corner
keys, six thumb keys, right bottom-corner keys. The matrix transform
(and therefore keymap binding order) is: left bottom-corner keys,
right bottom-corner keys, then the six thumb keys.

Since the physical layout keys map to keymap bindings by index, ZMK
Studio rendered the right bottom-corner bindings on the first three
thumb keys and shifted the thumb bindings onto the wrong keys.
Verified against hardware with a Studio-enabled build over BLE.
Building with CONFIG_ZMK_STUDIO=y previously failed because the nix
pipeline never exercised Studio:

- ZMK_STUDIO_RPC selects NANOPB, but the nanopb Zephyr module was not
  in requiredZephyrModules (Kconfig abort)
- the studio proto sources live in the zmk-studio-messages module,
  also absent (ZEPHYR_ZMK_STUDIO_MESSAGES_MODULE_DIR empty)
- the nanopb generator needs pkg_resources/protobuf/protoc at build
  time (python setuptools, protobuf, grpcio-tools)

Both modules were already pinned in nix/manifest.json and app/west.yml;
they are now passed to the build. Non-Studio builds are unaffected.
Verified by building go60_lh/go60_rh with CONFIG_ZMK_STUDIO=y and
running ZMK Studio against the resulting firmware over BLE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant