From: tmk Date: Fri, 10 May 2019 01:37:19 +0000 (+0900) Subject: usb_usb: Handle Rollover error X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=7412953feef594109a9db81aa83dae6b6f8dea3f;p=max%2Ftmk_keyboard.git 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 --- 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; }