From 44eb0da1a5b96e0ca109b34fe22e052e4ad8ff33 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 9 Jun 2023 06:46:54 +0300 Subject: [PATCH] ibmpc_usb: Add support for the Siemens F500 #760 TERM FUNC key sends a non-standard E0 12 E0 00(Make) and E0 F0 00 E0 F0 12(Break). Therefore, we must no longer check for 0 codes in the CS2_E0 and CS2_E0_F0 states. The "Term Func" key is mapped to "Volume Down" by default, since that matches the keyboard geometry. --- converter/ibmpc_usb/ibmpc_usb.cpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/converter/ibmpc_usb/ibmpc_usb.cpp b/converter/ibmpc_usb/ibmpc_usb.cpp index 247d556c7d..e4c0d75d0e 100644 --- a/converter/ibmpc_usb/ibmpc_usb.cpp +++ b/converter/ibmpc_usb/ibmpc_usb.cpp @@ -506,19 +506,6 @@ uint8_t IBMPCConverter::process_interface(void) break; } - // Keyboard Error/Overrun([3]p.26) or Buffer full - // Scan Code Set 1: 0xFF - // Scan Code Set 2 and 3: 0x00 - // Buffer full(IBMPC_ERR_FULL): 0xFF - if (keyboard_kind != PC_MOUSE && (code == 0x00 || code == 0xFF)) { - // clear stuck keys - matrix_clear(); - clear_keyboard(); - - xprintf("\n[CLR] "); - break; - } - switch (keyboard_kind) { case PC_XT: if (process_cs1(code) == -1) state = ERROR; @@ -950,6 +937,10 @@ uint8_t IBMPCConverter::cs2_e0code(uint8_t code) { case 0x0D: return 0x19; // LCompose DEC LK411 -> LGUI case 0x79: return 0x6D; // KP- DEC LK411 -> PCMM case 0x83: return 0x28; // F17 DEC LK411 + + // https://github.com/tmk/tmk_keyboard/pull/760 + case 0x00: return 0x65; // TERM FUNC Siemens F500 -> VOLD + default: return (code & 0x7F); } }