]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
ibmpc_usb: Add codes in Set 3
authortmk <hasu@tmk-kbd.com>
Mon, 27 Apr 2020 09:44:34 +0000 (18:44 +0900)
committertmk <hasu@tmk-kbd.com>
Tue, 28 Apr 2020 02:33:02 +0000 (11:33 +0900)
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

converter/ibmpc_usb/ibmpc_usb.c
converter/ibmpc_usb/unimap_trans.h

index 89afa081e260a6427987b419e0013ff075789b6f..17bdba83fcfb495b5bc9a659fbf77203fed1d3dc 100644 (file)
@@ -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;
index 4a1532ea5cb3a97ea90570d2bf3717690ec7bb3f..471ce707c8bfdddc2447cd261b4413fbb3085e82 100644 (file)
@@ -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 */