Skip to content

Harden Keychron Nape Pro tests and raise model DPI ceiling to 4000 - #4

Merged
snekxs merged 2 commits into
OpenMouse-Project:mainfrom
dwei30:nape-pro
Aug 11, 2026
Merged

Harden Keychron Nape Pro tests and raise model DPI ceiling to 4000#4
snekxs merged 2 commits into
OpenMouse-Project:mainfrom
dwei30:nape-pro

Conversation

@dwei30

@dwei30dwei30 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Extract keychronDecodeBattery into the Keychron protocol layer and use it from KeychronHidClient.
  • Add codec and fake-HID driver tests for packet framing, status reads, DPI/polling write-back, and Link-KM rejection.
  • Raise the Nape Pro DPI ladder to 50–4000 (step 50) via KEYCHRON_NAPE_DPI_* so future Keychron models can define their own ceilings.

Hardware verification

Keychron Nape Pro firmware v1.2.6-ZK Jun 30 2026 09:17:58:

  • Wired0x3434:0x0440 — status read, DPI write (1600), polling write (1000 Hz)
  • Link-KM0x3434:0xd026 — status read, DPI write (3200 / 800), polling write (125 Hz)
  • Both paths advertised polling rates 125 / 500 / 1000 Hz only on this firmware
  • Stage 5 was observed storing 4000 DPI, which was changed.

Notes

Test plan

  • npm run check
  • Wired Nape Pro: read status, set DPI, set polling
  • Link-KM: read status, set DPI, set polling
  • Confirm UI offers up to 4000 DPI and accepts a 4000 write
  • Confirm unrelated Link-KM pairings still reject cleanly

dwei30and others added 2 commits August 10, 2026 18:45
Extract battery decoding into the protocol layer and cover packet framing, status reads, DPI/polling write-back, and Link-KM rejection with a fake HID device.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use KEYCHRON_NAPE_DPI_* constants so future Keychron mice can define their own ranges without inheriting this cap.
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for freeto 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.

2 participants

@dwei30@snekxs