Fixed TAP_HOLD_CAPS_DELAY doens't work with wireless mode

This commit is contained in:
lokher 2024-09-11 17:13:03 +08:00
parent 58118c1d2c
commit 568ab37cce
2 changed files with 20 additions and 0 deletions

View File

@ -341,10 +341,15 @@ void wireless_send_keyboard(report_keyboard_t *report) {
if (wireless_state == WT_CONNECTED || (wireless_state == WT_PARING && pincodeEntry)) {
if (wireless_transport.send_keyboard) {
#ifndef DISABLE_REPORT_BUFFER
bool empty = report_buffer_is_empty();
report_buffer_t report_buffer;
report_buffer.type = REPORT_TYPE_KB;
memcpy(&report_buffer.keyboard, report, sizeof(report_keyboard_t));
report_buffer_enqueue(&report_buffer);
if (empty)
report_buffer_task();
#else
wireless_transport.send_keyboard(&report->mods);
#endif
@ -362,10 +367,15 @@ void wireless_send_nkro(report_nkro_t *report) {
if (wireless_state == WT_CONNECTED || (wireless_state == WT_PARING && pincodeEntry)) {
if (wireless_transport.send_nkro) {
#ifndef DISABLE_REPORT_BUFFER
bool empty = report_buffer_is_empty();
report_buffer_t report_buffer;
report_buffer.type = REPORT_TYPE_NKRO;
memcpy(&report_buffer.nkro, report, sizeof(report_nkro_t));
report_buffer_enqueue(&report_buffer);
if (empty)
report_buffer_task();
#else
wireless_transport.send_nkro(&report->mods);
#endif

View File

@ -351,10 +351,15 @@ void wireless_send_keyboard(report_keyboard_t *report) {
if (wireless_state == WT_CONNECTED || (wireless_state == WT_PARING && pincodeEntry)) {
if (wireless_transport.send_keyboard) {
#ifndef DISABLE_REPORT_BUFFER
bool empty = report_buffer_is_empty();
report_buffer_t report_buffer;
report_buffer.type = REPORT_TYPE_KB;
memcpy(&report_buffer.keyboard, report, sizeof(report_keyboard_t));
report_buffer_enqueue(&report_buffer);
if (empty)
report_buffer_task();
#else
wireless_transport.send_keyboard(&report->mods);
#endif
@ -372,10 +377,15 @@ void wireless_send_nkro(report_nkro_t *report) {
if (wireless_state == WT_CONNECTED || (wireless_state == WT_PARING && pincodeEntry)) {
if (wireless_transport.send_nkro) {
#ifndef DISABLE_REPORT_BUFFER
bool empty = report_buffer_is_empty();
report_buffer_t report_buffer;
report_buffer.type = REPORT_TYPE_NKRO;
memcpy(&report_buffer.nkro, report, sizeof(report_nkro_t));
report_buffer_enqueue(&report_buffer);
if (empty)
report_buffer_task();
#else
wireless_transport.send_nkro(&report->mods);
#endif