Skip to content

Commit

Permalink
addressed a few issues in nkro
Browse files Browse the repository at this point in the history
  • Loading branch information
Huckies committed Aug 18, 2024
1 parent fa0630b commit 63c70fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions qmk_porting/protocol/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,15 @@ void keyboard_check_protocol_mode()

if (last_mode != keymap_config.nkro) {
// send a keyboard report to trigger mode change
report_keyboard_t dummy_report = {};
if (keymap_config.nkro) {
report_nkro_t dummy_report = { .report_id = REPORT_ID_NKRO };

host_keyboard_send(&dummy_report);
host_nkro_send(&dummy_report);
} else {
report_keyboard_t dummy_report = {};

host_keyboard_send(&dummy_report);
}
last_mode = keymap_config.nkro;
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion qmk_porting/protocol/protocol_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static void send_keyboard(report_keyboard_t *report)

static void send_nkro(report_nkro_t *report)
{
hid_keyboard_send_report(KEYBOARD_MODE_NKRO, (uint8_t *)&report, EXKEY_IN_EP_SIZE);
hid_keyboard_send_report(KEYBOARD_MODE_NKRO, (uint8_t *)report, EXKEY_IN_EP_SIZE);
}

static void send_mouse(report_mouse_t *report)
Expand Down

0 comments on commit 63c70fb

Please sign in to comment.