From f002afc60aa07403127141caeb4b5c43270cb06d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ba=C5=BEant?= Date: Mon, 30 Nov 2026 23:38:18 +0100 Subject: [PATCH] wireless: fix raw HID over the 2.4 GHz receiver 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 --- keyboards/keychron/common/wireless/wireless.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/keyboards/keychron/common/wireless/wireless.c b/keyboards/keychron/common/wireless/wireless.c index f5483be3be11..14365bfce854 100644 --- a/keyboards/keychron/common/wireless/wireless.c +++ b/keyboards/keychron/common/wireless/wireless.c @@ -607,13 +607,9 @@ void wireless_event_task(void) { case EVT_CONECTION_INTERVAL: report_buffer_set_inverval(event.params.interval); break; -#if defined(RAW_ENABLE) && defined(WILRESS_RAW_ENABLE) +#if defined(RAW_ENABLE) && defined(WIRELESS_RAW_ENABLE) case EVT_RAW_HID: -# ifdef VIA_ENABLE - via_raw_hid_receive(RAW_HID_SRC_WIRELESS, event.params.raw_hid_data, 32); -# else - kc_raw_hid_rx(RAW_HID_SRC_WIRELESS, event.params.raw_hid_data, 32); -# endif + raw_hid_receive(RAW_HID_SRC_WIRELESS, event.params.raw_hid_data, 32); lpm_timer_reset(); break; #endif