From: tmk Date: Mon, 27 Apr 2020 09:44:34 +0000 (+0900) Subject: ibmpc_usb: Add codes in Set 3 X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=87bd991afa86c3bc83317bd17667c3eda5e7661c;p=max%2Ftmk_keyboard.git ibmpc_usb: Add codes in Set 3 GUI, Application, Henkan, Mehenkan, Kana used in PS/2 PC keyboard when it is switched to Set 3 https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol#g80-3600-and-skidata2-de-in-code-set-3 --- diff --git a/converter/ibmpc_usb/ibmpc_usb.c b/converter/ibmpc_usb/ibmpc_usb.c index 89afa081..17bdba83 100644 --- a/converter/ibmpc_usb/ibmpc_usb.c +++ b/converter/ibmpc_usb/ibmpc_usb.c @@ -999,18 +999,36 @@ static int8_t process_cs3(void) case 0xF0: state = F0; break; - case 0x83: + case 0x83: // PrintScreen matrix_make(0x02); break; - case 0x84: + case 0x84: // Keypad * matrix_make(0x7F); break; + case 0x85: // Muhenkan + matrix_make(0x0B); + break; + case 0x86: // Henkan + matrix_make(0x06); + break; + case 0x87: // Hiragana + matrix_make(0x00); + break; + case 0x8B: // Left GUI + matrix_make(0x01); + break; + case 0x8C: // Right GUI + matrix_make(0x09); + break; + case 0x8D: // Application + matrix_make(0x0A); + break; default: // normal key make if (code < 0x80) { matrix_make(code); } else { xprintf("!CS3_READY!\n"); - return -1; + //return -1; } } break; @@ -1027,21 +1045,45 @@ static int8_t process_cs3(void) state = READY; return -1; break; - case 0x83: + case 0x83: // PrintScreen matrix_break(0x02); state = READY; break; - case 0x84: + case 0x84: // Keypad * matrix_break(0x7F); state = READY; break; + case 0x85: // Muhenkan + matrix_break(0x0B); + state = READY; + break; + case 0x86: // Henkan + matrix_break(0x06); + state = READY; + break; + case 0x87: // Hiragana + matrix_break(0x00); + state = READY; + break; + case 0x8B: // Left GUI + matrix_break(0x01); + state = READY; + break; + case 0x8C: // Right GUI + matrix_break(0x09); + state = READY; + break; + case 0x8D: // Application + matrix_break(0x0A); + state = READY; + break; default: state = READY; if (code < 0x80) { matrix_break(code); } else { xprintf("!CS3_F0!\n"); - return -1; + //return -1; } } break; diff --git a/converter/ibmpc_usb/unimap_trans.h b/converter/ibmpc_usb/unimap_trans.h index 4a1532ea..471ce707 100644 --- a/converter/ibmpc_usb/unimap_trans.h +++ b/converter/ibmpc_usb/unimap_trans.h @@ -192,10 +192,9 @@ const uint8_t PROGMEM unimap_cs2[MATRIX_ROWS][MATRIX_COLS] = { * `-------' `-----' `---------------------------------------' `-----' `---' `---------------' * *: remapped 83->02, 84->7F * 51, 5C, 5D, 68, 78: Hidden keys in IBM 122-key terminal keyboard [7] - * unused: UNIMAP_KANA */ const uint8_t PROGMEM unimap_cs3[MATRIX_ROWS][MATRIX_COLS] = { - { UNIMAP_NO, UNIMAP_LGUI, UNIMAP_PSCR, UNIMAP_VOLD, UNIMAP_VOLU, UNIMAP_MUTE, UNIMAP_HENK, UNIMAP_F1 }, /* 00-07 */ + { UNIMAP_KANA, UNIMAP_LGUI, UNIMAP_PSCR, UNIMAP_VOLD, UNIMAP_VOLU, UNIMAP_MUTE, UNIMAP_HENK, UNIMAP_F1 }, /* 00-07 */ { UNIMAP_F13, UNIMAP_RGUI, UNIMAP_APP, UNIMAP_MHEN, UNIMAP_PAUS, UNIMAP_TAB, UNIMAP_GRV, UNIMAP_F2 }, /* 08-0F */ { UNIMAP_F14, UNIMAP_LCTL, UNIMAP_LSHIFT,UNIMAP_NUBS, UNIMAP_CAPS, UNIMAP_Q, UNIMAP_1, UNIMAP_F3 }, /* 10-17 */ { UNIMAP_F15, UNIMAP_LALT, UNIMAP_Z, UNIMAP_S, UNIMAP_A, UNIMAP_W, UNIMAP_2, UNIMAP_F4 }, /* 18-1F */