Skip to content

Commit

Permalink
ibmpc_usb: Add support for the Siemens F500 #760
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rhaberkorn authored and tmk committed Jun 10, 2023
1 parent 6a6c07d commit 44eb0da
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions converter/ibmpc_usb/ibmpc_usb.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 44eb0da

Please sign in to comment.