Repository navigation
Conversation
The EVT_RAW_HID handler could never be compiled in: - the guard tested WILRESS_RAW_ENABLE (typo) instead of WIRELESS_RAW_ENABLE - the VIA branch called via_raw_hid_receive(), which does not exist, and the non-VIA branch called kc_raw_hid_rx(), which wireless.c does not declare Call raw_hid_receive(src, data, length) in both cases, the same entry point USB uses (tmk_core/protocol/chibios/usb_main.c). Without VIA it is defined in keychron_raw_hid.c and forwards to kc_raw_hid_rx(). Co-Authored-By: Claude Opus 5.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.
Description
Raw HID (VIA / Keychron Launcher protocol) through the 2.4 GHz receiver (Keychron Link,
3434:d030) gets no answer from the keyboard. The receiver exposes the raw HID interface (usage page 0xFF60) andlkbt51.cturns the forwarded requests intoEVT_RAW_HIDevents, butwireless_event_task()cannot handle them:WILRESS_RAW_ENABLE(typo) instead ofWIRELESS_RAW_ENABLEvia_raw_hid_receive(), which does not exist anywhere in the tree, and the non-VIA branch callskc_raw_hid_rx(), whichwireless.cdoes not declare. With only the typo fixed, the firmware fails to build (implicit declaration) as soon asWIRELESS_RAW_ENABLEis defined.The handler now calls
raw_hid_receive(src, data, length)in both cases, the same entry point USB uses (tmk_core/protocol/chibios/usb_main.c). With VIA that is the VIA handler inquantum/via.c; without VIA it is defined inkeychron_raw_hid.cand forwards tokc_raw_hid_rx().WIRELESS_RAW_ENABLEstays opt-in (nothing defines it), so existing builds are not affected. A keyboard turns it on withOPT_DEFS += -DWIRELESS_RAW_ENABLEin itsrules.mk.The reply goes back through
kc_raw_hid_send(RAW_HID_SRC_WIRELESS, …)(directly, or viavia_raw_hid_send()for commands the VIA handler answers) →wireless_transport.send_raw_hidwhile the receiver is connected. In VIA buildskc_raw_hid_rx()already adds the VID/PID to the protocol version reply for a non-USB source, so the rest of the path appears intended for this.Testing
2025q3+ this PR builds forkeychron/k10_he/ansi:keychron(VIA) andkeychron/k10_he/ansi:default(no VIA), each without and withWIRELESS_RAW_ENABLE. With it,wireless.oreferencesraw_hid_receivein both keymaps, andwireless.ccompiles without warnings. The non-VIA variant was only built, not run.keychron(VIA) keymap with2025q3+ this fix (an earlier revision whose VIA branch is identical) +WIRELESS_RAW_ENABLE+ my fork's own features: lighting extras, an extra command id, init/task/key-handling hooks and its own EEPROM area. They change other parts ofkeychron_raw_hid.c, the RGB code and one LED-shutdown check inwireless/indicator.c, but notwireless_event_task()or the raw HID transport (lkbt51.c,transport.c).Notes (not changed by this PR)
kc_raw_hid_rx()sends only USB requests tosend_analog_matrix(). Keys in DKS or gamepad mode are therefore missing from the key tester over the receiver.lkbt51.cuses one staticraw_hid_databuffer for every queuedEVT_RAW_HID, so two requests queued back to back would overwrite each other.Types of Changes
Issues Fixed or Closed by This PR
Checklist
🤖 Generated with Claude Code