From 7412953feef594109a9db81aa83dae6b6f8dea3f Mon Sep 17 00:00:00 2001 From: tmk Date: Fri, 10 May 2019 10:37:19 +0900 Subject: [PATCH] usb_usb: Handle Rollover error How keyobards report Rollover error: Cherry: 0101010101010101 https://geekhack.org/index.php?topic=69169.msg2638223#msg2638223 Apple: 0000010101010101 https://geekhack.org/index.php?topic=69169.msg2760969#msg2760969 --- tmk_core/protocol/usb_hid/parser.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tmk_core/protocol/usb_hid/parser.cpp b/tmk_core/protocol/usb_hid/parser.cpp index 81a5bfa6..5e9a3efb 100644 --- a/tmk_core/protocol/usb_hid/parser.cpp +++ b/tmk_core/protocol/usb_hid/parser.cpp @@ -12,10 +12,13 @@ void KBDReportParser::Parse(USBHID *hid, bool is_rpt_id, uint8_t len, uint8_t *b } dprint("\r\n"); - // ignore Cherry 0101010101010101 bug report + // Rollover error + // Cherry: 0101010101010101 // https://geekhack.org/index.php?topic=69169.msg2638223#msg2638223 - if (buf[1] == 0x01) { - dprint("Cherry bug: ignored\r\n"); + // Apple: 0000010101010101 + // https://geekhack.org/index.php?topic=69169.msg2760969#msg2760969 + if (buf[2] == 0x01) { + dprint("Rollover error: ignored\r\n"); return; } -- 2.46.2