diff options
author | Maxim Devaev <[email protected]> | 2022-07-22 05:46:57 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-07-22 05:46:57 +0300 |
commit | f277160396ae7267756f87a215b93a2b5bb7a989 (patch) | |
tree | b508722ac82233c2aaf8eebda1c7a5e68914c730 /hid/lib/drivers-avr/ps2 | |
parent | 867412a6cdc91f997baa42cee92df2b466dfdc75 (diff) |
using usb codes instead of arduino cinstants
Diffstat (limited to 'hid/lib/drivers-avr/ps2')
-rw-r--r-- | hid/lib/drivers-avr/ps2/keymap.h | 214 | ||||
-rw-r--r-- | hid/lib/drivers-avr/ps2/keymap.h.mako | 2 |
2 files changed, 108 insertions, 108 deletions
diff --git a/hid/lib/drivers-avr/ps2/keymap.h b/hid/lib/drivers-avr/ps2/keymap.h index a2b6f8fd..8f407bb5 100644 --- a/hid/lib/drivers-avr/ps2/keymap.h +++ b/hid/lib/drivers-avr/ps2/keymap.h @@ -37,112 +37,112 @@ void keymapPs2(uint8_t code, Ps2KeyType *ps2_type, uint8_t *ps2_code) { *ps2_code = 0; switch (code) { - case 1: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 28; return; // KEY_A - case 2: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 50; return; // KEY_B - case 3: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 33; return; // KEY_C - case 4: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 35; return; // KEY_D - case 5: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 36; return; // KEY_E - case 6: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 43; return; // KEY_F - case 7: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 52; return; // KEY_G - case 8: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 51; return; // KEY_H - case 9: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 67; return; // KEY_I - case 10: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 59; return; // KEY_J - case 11: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 66; return; // KEY_K - case 12: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 75; return; // KEY_L - case 13: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 58; return; // KEY_M - case 14: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 49; return; // KEY_N - case 15: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 68; return; // KEY_O - case 16: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 77; return; // KEY_P - case 17: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 21; return; // KEY_Q - case 18: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 45; return; // KEY_R - case 19: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 27; return; // KEY_S - case 20: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 44; return; // KEY_T - case 21: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 60; return; // KEY_U - case 22: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 42; return; // KEY_V - case 23: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 29; return; // KEY_W - case 24: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 34; return; // KEY_X - case 25: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 53; return; // KEY_Y - case 26: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 26; return; // KEY_Z - case 27: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 22; return; // KEY_1 - case 28: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 30; return; // KEY_2 - case 29: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 38; return; // KEY_3 - case 30: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 37; return; // KEY_4 - case 31: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 46; return; // KEY_5 - case 32: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 54; return; // KEY_6 - case 33: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 61; return; // KEY_7 - case 34: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 62; return; // KEY_8 - case 35: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 70; return; // KEY_9 - case 36: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 69; return; // KEY_0 - case 37: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 90; return; // KEY_ENTER - case 38: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 118; return; // KEY_ESC - case 39: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 102; return; // KEY_BACKSPACE - case 40: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 13; return; // KEY_TAB - case 41: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 41; return; // KEY_SPACE - case 42: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 78; return; // KEY_MINUS - case 43: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 85; return; // KEY_EQUAL - case 44: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 84; return; // KEY_LEFT_BRACE - case 45: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 91; return; // KEY_RIGHT_BRACE - case 46: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 93; return; // KEY_BACKSLASH - case 47: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 76; return; // KEY_SEMICOLON - case 48: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 82; return; // KEY_QUOTE - case 49: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 14; return; // KEY_TILDE - case 50: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 65; return; // KEY_COMMA - case 51: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 73; return; // KEY_PERIOD - case 52: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 74; return; // KEY_SLASH - case 53: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 88; return; // KEY_CAPS_LOCK - case 54: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 5; return; // KEY_F1 - case 55: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 6; return; // KEY_F2 - case 56: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 4; return; // KEY_F3 - case 57: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 12; return; // KEY_F4 - case 58: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 3; return; // KEY_F5 - case 59: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 11; return; // KEY_F6 - case 60: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 131; return; // KEY_F7 - case 61: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 10; return; // KEY_F8 - case 62: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 1; return; // KEY_F9 - case 63: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 9; return; // KEY_F10 - case 64: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 120; return; // KEY_F11 - case 65: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 7; return; // KEY_F12 - case 66: *ps2_type = PS2_KEY_TYPE_PRINT; *ps2_code = 255; return; // KEY_PRINT - case 67: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 112; return; // KEY_INSERT - case 68: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 108; return; // KEY_HOME - case 69: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 125; return; // KEY_PAGE_UP - case 70: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 113; return; // KEY_DELETE - case 71: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 105; return; // KEY_END - case 72: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 122; return; // KEY_PAGE_DOWN - case 73: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 116; return; // KEY_RIGHT_ARROW - case 74: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 107; return; // KEY_LEFT_ARROW - case 75: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 114; return; // KEY_DOWN_ARROW - case 76: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 117; return; // KEY_UP_ARROW - case 77: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 20; return; // KEY_LEFT_CTRL - case 78: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 18; return; // KEY_LEFT_SHIFT - case 79: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 17; return; // KEY_LEFT_ALT - case 80: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 31; return; // KEY_LEFT_GUI - case 81: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 20; return; // KEY_RIGHT_CTRL - case 82: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 89; return; // KEY_RIGHT_SHIFT - case 83: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 17; return; // KEY_RIGHT_ALT - case 84: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 39; return; // KEY_RIGHT_GUI - case 85: *ps2_type = PS2_KEY_TYPE_PAUSE; *ps2_code = 255; return; // KEY_PAUSE - case 86: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 126; return; // KEY_SCROLL_LOCK - case 87: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 119; return; // KEY_NUM_LOCK - case 88: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 47; return; // KEY_MENU - case 89: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 74; return; // KEYPAD_DIVIDE - case 90: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 124; return; // KEYPAD_MULTIPLY - case 91: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 123; return; // KEYPAD_SUBTRACT - case 92: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 121; return; // KEYPAD_ADD - case 93: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 90; return; // KEYPAD_ENTER - case 94: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 105; return; // KEYPAD_1 - case 95: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 114; return; // KEYPAD_2 - case 96: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 122; return; // KEYPAD_3 - case 97: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 107; return; // KEYPAD_4 - case 98: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 115; return; // KEYPAD_5 - case 99: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 116; return; // KEYPAD_6 - case 100: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 108; return; // KEYPAD_7 - case 101: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 117; return; // KEYPAD_8 - case 102: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 125; return; // KEYPAD_9 - case 103: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 112; return; // KEYPAD_0 - case 104: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 113; return; // KEYPAD_DOT - case 105: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 94; return; // KEY_POWER - case 106: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 97; return; // KEY_NON_US - case 107: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 106; return; // KEY_INTERNATIONAL3 + case 1: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 28; return; // KeyA + case 2: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 50; return; // KeyB + case 3: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 33; return; // KeyC + case 4: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 35; return; // KeyD + case 5: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 36; return; // KeyE + case 6: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 43; return; // KeyF + case 7: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 52; return; // KeyG + case 8: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 51; return; // KeyH + case 9: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 67; return; // KeyI + case 10: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 59; return; // KeyJ + case 11: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 66; return; // KeyK + case 12: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 75; return; // KeyL + case 13: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 58; return; // KeyM + case 14: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 49; return; // KeyN + case 15: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 68; return; // KeyO + case 16: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 77; return; // KeyP + case 17: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 21; return; // KeyQ + case 18: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 45; return; // KeyR + case 19: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 27; return; // KeyS + case 20: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 44; return; // KeyT + case 21: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 60; return; // KeyU + case 22: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 42; return; // KeyV + case 23: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 29; return; // KeyW + case 24: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 34; return; // KeyX + case 25: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 53; return; // KeyY + case 26: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 26; return; // KeyZ + case 27: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 22; return; // Digit1 + case 28: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 30; return; // Digit2 + case 29: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 38; return; // Digit3 + case 30: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 37; return; // Digit4 + case 31: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 46; return; // Digit5 + case 32: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 54; return; // Digit6 + case 33: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 61; return; // Digit7 + case 34: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 62; return; // Digit8 + case 35: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 70; return; // Digit9 + case 36: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 69; return; // Digit0 + case 37: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 90; return; // Enter + case 38: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 118; return; // Escape + case 39: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 102; return; // Backspace + case 40: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 13; return; // Tab + case 41: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 41; return; // Space + case 42: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 78; return; // Minus + case 43: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 85; return; // Equal + case 44: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 84; return; // BracketLeft + case 45: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 91; return; // BracketRight + case 46: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 93; return; // Backslash + case 47: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 76; return; // Semicolon + case 48: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 82; return; // Quote + case 49: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 14; return; // Backquote + case 50: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 65; return; // Comma + case 51: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 73; return; // Period + case 52: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 74; return; // Slash + case 53: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 88; return; // CapsLock + case 54: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 5; return; // F1 + case 55: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 6; return; // F2 + case 56: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 4; return; // F3 + case 57: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 12; return; // F4 + case 58: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 3; return; // F5 + case 59: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 11; return; // F6 + case 60: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 131; return; // F7 + case 61: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 10; return; // F8 + case 62: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 1; return; // F9 + case 63: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 9; return; // F10 + case 64: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 120; return; // F11 + case 65: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 7; return; // F12 + case 66: *ps2_type = PS2_KEY_TYPE_PRINT; *ps2_code = 255; return; // PrintScreen + case 67: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 112; return; // Insert + case 68: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 108; return; // Home + case 69: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 125; return; // PageUp + case 70: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 113; return; // Delete + case 71: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 105; return; // End + case 72: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 122; return; // PageDown + case 73: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 116; return; // ArrowRight + case 74: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 107; return; // ArrowLeft + case 75: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 114; return; // ArrowDown + case 76: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 117; return; // ArrowUp + case 77: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 20; return; // ControlLeft + case 78: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 18; return; // ShiftLeft + case 79: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 17; return; // AltLeft + case 80: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 31; return; // MetaLeft + case 81: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 20; return; // ControlRight + case 82: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 89; return; // ShiftRight + case 83: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 17; return; // AltRight + case 84: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 39; return; // MetaRight + case 85: *ps2_type = PS2_KEY_TYPE_PAUSE; *ps2_code = 255; return; // Pause + case 86: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 126; return; // ScrollLock + case 87: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 119; return; // NumLock + case 88: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 47; return; // ContextMenu + case 89: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 74; return; // NumpadDivide + case 90: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 124; return; // NumpadMultiply + case 91: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 123; return; // NumpadSubtract + case 92: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 121; return; // NumpadAdd + case 93: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 90; return; // NumpadEnter + case 94: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 105; return; // Numpad1 + case 95: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 114; return; // Numpad2 + case 96: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 122; return; // Numpad3 + case 97: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 107; return; // Numpad4 + case 98: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 115; return; // Numpad5 + case 99: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 116; return; // Numpad6 + case 100: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 108; return; // Numpad7 + case 101: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 117; return; // Numpad8 + case 102: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 125; return; // Numpad9 + case 103: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 112; return; // Numpad0 + case 104: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 113; return; // NumpadDecimal + case 105: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 94; return; // Power + case 106: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 97; return; // IntlBackslash + case 107: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 106; return; // IntlYen } } diff --git a/hid/lib/drivers-avr/ps2/keymap.h.mako b/hid/lib/drivers-avr/ps2/keymap.h.mako index bc4ecb47..56644f87 100644 --- a/hid/lib/drivers-avr/ps2/keymap.h.mako +++ b/hid/lib/drivers-avr/ps2/keymap.h.mako @@ -38,7 +38,7 @@ void keymapPs2(uint8_t code, Ps2KeyType *ps2_type, uint8_t *ps2_code) { switch (code) { % for km in sorted(keymap, key=operator.attrgetter("mcu_code")): - case ${km.mcu_code}: *ps2_type = PS2_KEY_TYPE_${km.ps2_key.type.upper()}; *ps2_code = ${km.ps2_key.code}; return; // ${km.arduino_name} + case ${km.mcu_code}: *ps2_type = PS2_KEY_TYPE_${km.ps2_key.type.upper()}; *ps2_code = ${km.ps2_key.code}; return; // ${km.web_name} % endfor } } |