Skip to content

feat(keychron): offer Launcher's shortcut presets and polling-rate keys - #154

Merged
snekxs merged 2 commits into
OpenMouse-Project:mainfrom
ydw1904:feat/keychron-shortcut-buttons
Oct 3, 2026
Merged

snekxs merged 2 commits into
OpenMouse-Project:mainfrom
ydw1904:feat/keychron-shortcut-buttons

Conversation

@ydw1904

@ydw1904 ydw1904 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Ports two more of Launcher's button functions to the Keychron "8k" and "1k" drivers. Both are plain string entries in the existing remapper, so the app needs no change beyond the next protocol bump.

Shortcut presets (EFunKey 8)

Launcher's "Shortcuts" group for mice, from bundle module 52732 (shortCut): copy, cut, paste, screenshot, show desktop and browser zoom for Windows, their Cmd variants plus Launchpad and Mission Control for macOS, and display brightness. The codes are EShortcutKey (module 75994), written three bytes high to low like the mouse codes:

kind data example
0x07 modifier mask (ctrl 1, shift 2, alt 4, win/cmd 8), HID keycode Copy = 08 07 01 06
0x0c consumer usage, low byte first Mission Control = 08 0c 9f 02

Polling-rate keys (EFunKey 13)

Loop / next / previous with the same ELoopKey byte as the DPI keys. Launcher only lists them when pollingGearsSupport is set, which is feature byte 1 bit 4, the flag the 8k driver already reads as features.pollingGears. The 8k driver passes it through to keychronButtonOptions; the 1k protocol reports that flag as false in Launcher, so the 1k driver never offers them. Unknown codes still decode as "Custom".

Verification

  • Byte layouts come from Launcher's own encoder (class ke, shortCut() / pollingRate() on report 0xb3) and its enum module; see the tests for the exact records.
  • npm run build and npm test pass (1972 tests). New codec and driver tests cover encode, decode, the feature gate and the written 0x52 record.
  • Not yet run on hardware. The remap path itself was verified on an M6 in feat(keychron): drive every Launcher "8k" and "1k" mouse #148; these add entries to the same table.

ydw1904 and others added 2 commits October 2, 2026 21:30
The Launcher "Shortcuts" group (copy, cut, paste, screenshot, show
desktop, zoom, Launchpad, Mission Control, brightness) is EFunKey 8 with
EShortcutKey written three bytes high to low: kind 0x07 carries a
modifier mask and a HID keycode, kind 0x0c a consumer usage low byte
first. Polling-rate loop/+/- is EFunKey 13 with the ELoopKey byte, and
Launcher only shows it when feature byte 1 bit 4 (rewritable polling
gears) is set, so the 8k driver passes that flag through and the 1k
driver never offers it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@snekxs
snekxs merged commit 7c719c6 into OpenMouse-Project:main Oct 3, 2026
10 checks passed
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.

2 participants