]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
ibmpc_usb: Fix scan code set change detection
authortmk <hasu@tmk-kbd.com>
Tue, 12 May 2020 10:48:09 +0000 (19:48 +0900)
committertmk <hasu@tmk-kbd.com>
Tue, 12 May 2020 12:57:32 +0000 (21:57 +0900)
converter/ibmpc_usb/ibmpc_usb.c

index fe6ff647370c1339de8665445b8d43d982ea83b1..6879bf803c786541016814ae2993d5348f131ae5 100644 (file)
@@ -754,10 +754,7 @@ static int8_t process_cs2(uint8_t code)
                     break;
                 case 0xAA:  // Self-test passed
                 case 0xFC:  // Self-test failed
-                    // reset or plugin-in new keyboard
-                    state = INIT;
-                    return -1;
-                    break;
+                    // replug or unstable connection probably
                 default:    // normal key make
                     state = INIT;
                     if (code < 0x80) {
@@ -943,7 +940,7 @@ static int8_t process_cs3(uint8_t code)
                         matrix_make(code);
                     } else {
                         xprintf("!CS3_READY!\n");
-                        //return -1;
+                        return -1;
                     }
             }
             break;
@@ -987,7 +984,7 @@ static int8_t process_cs3(uint8_t code)
                         matrix_break(code);
                     } else {
                         xprintf("!CS3_F0!\n");
-                        //return -1;
+                        return -1;
                     }
             }
             break;