]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
usb_usb: Handle Rollover error
authortmk <hasu@tmk-kbd.com>
Fri, 10 May 2019 01:37:19 +0000 (10:37 +0900)
committertmk <hasu@tmk-kbd.com>
Wed, 29 May 2019 06:22:23 +0000 (15:22 +0900)
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

index 81a5bfa6515d6cda19f2b93adfc16e142ea246d4..5e9a3efb90c3b06497710bac813888f5482a6278 100644 (file)
@@ -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;
     }