Skip to content

Add Keychron Nape Pro layer remaps and per-layer orientation - #29

Open
dwei30 wants to merge 4 commits into
OpenMouse-Project:mainfrom
dwei30:nape-pro
Open

Add Keychron Nape Pro layer remaps and per-layer orientation#29
dwei30 wants to merge 4 commits into
OpenMouse-Project:mainfrom
dwei30:nape-pro

Conversation

@dwei30

@dwei30 dwei30 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add Nape Pro VIA keymap get/set: packed GET_BUFFER (cmd 18), SET_KEYCODE (cmd 5), and independent encoder CCW/CW (GET_ENCODER 20 / SET_ENCODER 21). Overlay keys are 01 / 02 / 03 / 04 / M1 / M2; unlabeled column 6 stays hidden.
  • Treat firmware layers as 1–8 (same index as GET_CURRENT_LAYER and Keychron Launcher). UI labels stay 0–7. VIA may report a spare slot at index 0; OpenMouse caps at 8.
  • Add per-layer sensor orientation: GET_LAYER_ORI 56 / SET_LAYER_ORI 57 as [167, 57, layer, index], plus live SET_ORI 52 when writing the active layer. Eight 45° steps (0°–315°).
  • Keep this driver Nape-only (nape-hid.ts, KEYCHRON_NAPE_*). M-series Keychron mice use a different protocol and should not reuse these helpers.

Test plan

  • npm run check in mouse-protocol
  • Wired Nape Pro (3434:0440, firmware v1.2.6-ZK): readLayerKeymap matches Launcher for the current layer
  • setKeycode / setEncoder confirm on readback; CW and CCW can differ
  • Layer 3 remap hits GET_BUFFER offset 14 * 3 (0x2A), not layer-minus-one
  • setLayerOrientation(3, 5) stores 225° on layer 3 and leaves other layers unchanged
  • Writing orientation on the active layer also updates live GET_ORI
  • Link-KM receiver still rejects a non-Nape pairing

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