-
Notifications
You must be signed in to change notification settings - Fork 33
Merged
Conversation
KEYCHRON_M6_HID_FILTERS was defined but never spread into SUPPORTED_HID_FILTERS, so navigator.hid.requestDevice never offered the M6's 0xffc1 collection and the mouse was simply never detected, even though the driver and its app-side registry entry both shipped. Adds a test that fails on any exported *_FILTERS list that is not offered, so the next driver cannot land half-wired the same way. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Problem
The Keychron M6 is never detected, even though the driver (
src/drivers/keychron/m6-hid.ts), its registry entry, and the app-sideNEEDS_OPENentry inopenmouseall shipped.KEYCHRON_M6_HID_FILTERSis defined insrc/drivers/vendors.tsand referenced nowhere. It was never spread intoSUPPORTED_HID_FILTERS, which is the list the app hands tonavigator.hid.requestDevice(). Chrome therefore never offers the M6's0xffc1collection, the driver never sees a device, and the symptom is "not detected" rather than a connection error.Fix
One line, next to the Nape filters:
...KEYCHRON_NAPE_HID_FILTERS, + ...KEYCHRON_M6_HID_FILTERS,Guard
registry.test.tsalready checks the other direction (every offered product id has a driver). This adds the missing direction: no exported*_FILTERSlist may be absent fromSUPPORTED_HID_FILTERS, so the next driver cannot land half-wired the same way.The M6 was the only orphan of the 16 exported filter lists.
Verification
npm run buildclean.registry.test.ts6/6 pass.🤖 Generated with Claude Code