From 1f6524968bb556ee2accd0c43f590057341cd77c Mon Sep 17 00:00:00 2001 From: taudris Date: Wed, 28 Dec 2022 01:18:40 -0800 Subject: [PATCH] Keep PROTOCOL_VUSB path. --- quantum/action_util.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/quantum/action_util.c b/quantum/action_util.c index 2249f6310a..4a8af150d6 100644 --- a/quantum/action_util.c +++ b/quantum/action_util.c @@ -272,7 +272,7 @@ void send_keyboard_report(void) { static report_keyboard_t last_report; -#if defined(REPORT_MODS_SEPARATELY) +#ifdef REPORT_MODS_SEPARATELY if (last_report.mods != keyboard_report->mods) { //build a keyboard report that only updates the mods report_keyboard_t mod_report; @@ -284,10 +284,16 @@ void send_keyboard_report(void) { } #endif - if (memcmp(&last_report, keyboard_report, sizeof(report_keyboard_t)) != 0) { +#ifdef PROTOCOL_VUSB + host_keyboard_send(keyboard_report); + memcpy(&last_report, keyboard_report, sizeof(report_keyboard_t)); +#else + /* Only send the report if there are changes to propagate to the host. */ + if (memcmp(keyboard_report, &last_report, sizeof(report_keyboard_t)) != 0) { host_keyboard_send(keyboard_report); memcpy(&last_report, keyboard_report, sizeof(report_keyboard_t)); } +#endif } /** \brief Get mods