Add Keychron RGB handler to the theme keyboard pipeline - #9545
Open
ueltyx wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Keychron RGB support to the existing
keyboard.rgbtheme pipeline, following theomarchy-theme-set-keyboard-asus-rog/-f16handler pattern exactly.Keychron's own firmware (V/Q/K "Ultra" and "Max" series, protocol v11+) implements the VIA raw-HID protocol on a vendor config channel (USB usage page
0xFF60, usage0x61). It is the same lighting command set the Framework 16 handler already speaks viaqmk_hid: solid effect ([7,3,2,1]), HSV color ([7,3,4,h,s]), NVRAM save ([9,3]). The protocol was extracted from Keychron's own Launcher web app (WebHID client) — no firmware flashing, no reverse-engineered vendor blobs.Changes
bin/omarchy-keychron-rgb— transport: bash + embedded Python (stdlib only, no new packages, nothing to compile). Auto-discovers the config channel by vendor3434+ usage-page signature and round-trip-probes it, so it works across models and connection modes (with cable and dongle both enumerated, one channel is a dead end depending on the keyboard's mode switch — the probe picks the live one).bin/omarchy-hw-keychron— hardware detect (USB vendor3434),hw-*pattern.bin/omarchy-theme-set-keyboard-keychron— the handler; no-op without a Keychron present.bin/omarchy-theme-set-keyboard— dispatch entry.default/udev/keychron-rgb.rules+install/hardware/keychron-rgb.sh+ migration — vendor-wide uaccess rule (also unblocks the official Keychron Launcher web app), mirroringframework/qmk-hid.sh.install/hardware/all.sh— install wiring.Verified behavior
Tested on a Keychron V1 Ultra 8K (ZMK-based,
3434:0c10) plus Ultra-Link 8K 2.4GHz dongle (3434:d028):keyboard.rgb(ff00ff) overriding the accent template.keyboard.rgb).Testing
./test/cli— 116 ok, 0 failures (includes metadata lint for the new commands)../test/shell— 2905 ok, 0 failures.Transparency
This contribution was developed end-to-end with AI assistance (an agentic CLI coding assistant): protocol extraction from the Launcher bundle, tool implementation, and the automated 22-theme verification. The submitter performed all hardware verification on their machine.
One natural follow-up (not in this PR to keep it scoped): a udev
RUN+on the rule could invoke the handler on (re)plug, re-syncing the keyboard at boot and whenever it returns from wireless to wired. Happy to add if wanted.