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 | |
parent | 867412a6cdc91f997baa42cee92df2b466dfdc75 (diff) |
using usb codes instead of arduino cinstants
-rwxr-xr-x | genmap.py | 17 | ||||
-rw-r--r-- | hid/lib/drivers-avr/ps2/keymap.h | 214 | ||||
-rw-r--r-- | hid/lib/drivers-avr/ps2/keymap.h.mako | 2 | ||||
-rw-r--r-- | hid/lib/drivers-avr/usb/keymap.h | 214 | ||||
-rw-r--r-- | hid/lib/drivers-avr/usb/keymap.h.mako | 6 | ||||
-rw-r--r-- | keymap.csv | 216 | ||||
-rw-r--r-- | testenv/linters/vulture-wl.py | 1 |
7 files changed, 341 insertions, 329 deletions
@@ -44,6 +44,18 @@ class _UsbKey: code: int is_modifier: bool + @property + def arduino_modifier_code(self) -> int: + # https://github.com/NicoHood/HID/blob/4bf6cd6/src/HID-APIs/DefaultKeyboardAPI.hpp#L31 + assert self.is_modifier + code = self.code + offset = 0 + while not (code & 0x1): + code >>= 1 + offset += 1 + assert offset < 8 + return ((0xE << 4) | offset) + @dataclasses.dataclass(frozen=True) class _Ps2Key: @@ -62,7 +74,6 @@ class _X11Key: class _KeyMapping: web_name: str mcu_code: int - arduino_name: str usb_key: _UsbKey ps2_key: _Ps2Key at1_code: int @@ -116,7 +127,6 @@ def _read_keymap_csv(path: str) -> List[_KeyMapping]: keymap.append(_KeyMapping( web_name=row["web_name"], mcu_code=int(row["mcu_code"]), - arduino_name=row["arduino_name"], usb_key=_parse_usb_key(row["usb_key"]), ps2_key=_parse_ps2_key(row["ps2_key"]), at1_code=int(row["at1_code"], 16), @@ -145,8 +155,7 @@ def main() -> None: # Fields list: # - Web # - MCU code - # - Arduino name - # - USB code (^ for mod mask) + # - USB code (^ for the modifier mask) # - PS/2 key # - AT set1 # - X11 keysyms (^ for shift) 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 } } diff --git a/hid/lib/drivers-avr/usb/keymap.h b/hid/lib/drivers-avr/usb/keymap.h index 224a181c..5c885119 100644 --- a/hid/lib/drivers-avr/usb/keymap.h +++ b/hid/lib/drivers-avr/usb/keymap.h @@ -27,113 +27,113 @@ KeyboardKeycode keymapUsb(uint8_t code) { switch (code) { - case 1: return KEY_A; - case 2: return KEY_B; - case 3: return KEY_C; - case 4: return KEY_D; - case 5: return KEY_E; - case 6: return KEY_F; - case 7: return KEY_G; - case 8: return KEY_H; - case 9: return KEY_I; - case 10: return KEY_J; - case 11: return KEY_K; - case 12: return KEY_L; - case 13: return KEY_M; - case 14: return KEY_N; - case 15: return KEY_O; - case 16: return KEY_P; - case 17: return KEY_Q; - case 18: return KEY_R; - case 19: return KEY_S; - case 20: return KEY_T; - case 21: return KEY_U; - case 22: return KEY_V; - case 23: return KEY_W; - case 24: return KEY_X; - case 25: return KEY_Y; - case 26: return KEY_Z; - case 27: return KEY_1; - case 28: return KEY_2; - case 29: return KEY_3; - case 30: return KEY_4; - case 31: return KEY_5; - case 32: return KEY_6; - case 33: return KEY_7; - case 34: return KEY_8; - case 35: return KEY_9; - case 36: return KEY_0; - case 37: return KEY_ENTER; - case 38: return KEY_ESC; - case 39: return KEY_BACKSPACE; - case 40: return KEY_TAB; - case 41: return KEY_SPACE; - case 42: return KEY_MINUS; - case 43: return KEY_EQUAL; - case 44: return KEY_LEFT_BRACE; - case 45: return KEY_RIGHT_BRACE; - case 46: return KEY_BACKSLASH; - case 47: return KEY_SEMICOLON; - case 48: return KEY_QUOTE; - case 49: return KEY_TILDE; - case 50: return KEY_COMMA; - case 51: return KEY_PERIOD; - case 52: return KEY_SLASH; - case 53: return KEY_CAPS_LOCK; - case 54: return KEY_F1; - case 55: return KEY_F2; - case 56: return KEY_F3; - case 57: return KEY_F4; - case 58: return KEY_F5; - case 59: return KEY_F6; - case 60: return KEY_F7; - case 61: return KEY_F8; - case 62: return KEY_F9; - case 63: return KEY_F10; - case 64: return KEY_F11; - case 65: return KEY_F12; - case 66: return KEY_PRINT; - case 67: return KEY_INSERT; - case 68: return KEY_HOME; - case 69: return KEY_PAGE_UP; - case 70: return KEY_DELETE; - case 71: return KEY_END; - case 72: return KEY_PAGE_DOWN; - case 73: return KEY_RIGHT_ARROW; - case 74: return KEY_LEFT_ARROW; - case 75: return KEY_DOWN_ARROW; - case 76: return KEY_UP_ARROW; - case 77: return KEY_LEFT_CTRL; - case 78: return KEY_LEFT_SHIFT; - case 79: return KEY_LEFT_ALT; - case 80: return KEY_LEFT_GUI; - case 81: return KEY_RIGHT_CTRL; - case 82: return KEY_RIGHT_SHIFT; - case 83: return KEY_RIGHT_ALT; - case 84: return KEY_RIGHT_GUI; - case 85: return KEY_PAUSE; - case 86: return KEY_SCROLL_LOCK; - case 87: return KEY_NUM_LOCK; - case 88: return KEY_MENU; - case 89: return KEYPAD_DIVIDE; - case 90: return KEYPAD_MULTIPLY; - case 91: return KEYPAD_SUBTRACT; - case 92: return KEYPAD_ADD; - case 93: return KEYPAD_ENTER; - case 94: return KEYPAD_1; - case 95: return KEYPAD_2; - case 96: return KEYPAD_3; - case 97: return KEYPAD_4; - case 98: return KEYPAD_5; - case 99: return KEYPAD_6; - case 100: return KEYPAD_7; - case 101: return KEYPAD_8; - case 102: return KEYPAD_9; - case 103: return KEYPAD_0; - case 104: return KEYPAD_DOT; - case 105: return KEY_POWER; - case 106: return KEY_NON_US; - case 107: return KEY_INTERNATIONAL3; + case 1: return 4; // KeyA + case 2: return 5; // KeyB + case 3: return 6; // KeyC + case 4: return 7; // KeyD + case 5: return 8; // KeyE + case 6: return 9; // KeyF + case 7: return 10; // KeyG + case 8: return 11; // KeyH + case 9: return 12; // KeyI + case 10: return 13; // KeyJ + case 11: return 14; // KeyK + case 12: return 15; // KeyL + case 13: return 16; // KeyM + case 14: return 17; // KeyN + case 15: return 18; // KeyO + case 16: return 19; // KeyP + case 17: return 20; // KeyQ + case 18: return 21; // KeyR + case 19: return 22; // KeyS + case 20: return 23; // KeyT + case 21: return 24; // KeyU + case 22: return 25; // KeyV + case 23: return 26; // KeyW + case 24: return 27; // KeyX + case 25: return 28; // KeyY + case 26: return 29; // KeyZ + case 27: return 30; // Digit1 + case 28: return 31; // Digit2 + case 29: return 32; // Digit3 + case 30: return 33; // Digit4 + case 31: return 34; // Digit5 + case 32: return 35; // Digit6 + case 33: return 36; // Digit7 + case 34: return 37; // Digit8 + case 35: return 38; // Digit9 + case 36: return 39; // Digit0 + case 37: return 40; // Enter + case 38: return 41; // Escape + case 39: return 42; // Backspace + case 40: return 43; // Tab + case 41: return 44; // Space + case 42: return 45; // Minus + case 43: return 46; // Equal + case 44: return 47; // BracketLeft + case 45: return 48; // BracketRight + case 46: return 49; // Backslash + case 47: return 51; // Semicolon + case 48: return 52; // Quote + case 49: return 53; // Backquote + case 50: return 54; // Comma + case 51: return 55; // Period + case 52: return 56; // Slash + case 53: return 57; // CapsLock + case 54: return 58; // F1 + case 55: return 59; // F2 + case 56: return 60; // F3 + case 57: return 61; // F4 + case 58: return 62; // F5 + case 59: return 63; // F6 + case 60: return 64; // F7 + case 61: return 65; // F8 + case 62: return 66; // F9 + case 63: return 67; // F10 + case 64: return 68; // F11 + case 65: return 69; // F12 + case 66: return 70; // PrintScreen + case 67: return 73; // Insert + case 68: return 74; // Home + case 69: return 75; // PageUp + case 70: return 76; // Delete + case 71: return 77; // End + case 72: return 78; // PageDown + case 73: return 79; // ArrowRight + case 74: return 80; // ArrowLeft + case 75: return 81; // ArrowDown + case 76: return 82; // ArrowUp + case 77: return 224; // ControlLeft + case 78: return 225; // ShiftLeft + case 79: return 226; // AltLeft + case 80: return 227; // MetaLeft + case 81: return 228; // ControlRight + case 82: return 229; // ShiftRight + case 83: return 230; // AltRight + case 84: return 231; // MetaRight + case 85: return 72; // Pause + case 86: return 71; // ScrollLock + case 87: return 83; // NumLock + case 88: return 101; // ContextMenu + case 89: return 84; // NumpadDivide + case 90: return 85; // NumpadMultiply + case 91: return 86; // NumpadSubtract + case 92: return 87; // NumpadAdd + case 93: return 88; // NumpadEnter + case 94: return 89; // Numpad1 + case 95: return 90; // Numpad2 + case 96: return 91; // Numpad3 + case 97: return 92; // Numpad4 + case 98: return 93; // Numpad5 + case 99: return 94; // Numpad6 + case 100: return 95; // Numpad7 + case 101: return 96; // Numpad8 + case 102: return 97; // Numpad9 + case 103: return 98; // Numpad0 + case 104: return 99; // NumpadDecimal + case 105: return 102; // Power + case 106: return 100; // IntlBackslash + case 107: return 137; // IntlYen default: return KEY_ERROR_UNDEFINED; } } diff --git a/hid/lib/drivers-avr/usb/keymap.h.mako b/hid/lib/drivers-avr/usb/keymap.h.mako index fe295bea..8cc8cd42 100644 --- a/hid/lib/drivers-avr/usb/keymap.h.mako +++ b/hid/lib/drivers-avr/usb/keymap.h.mako @@ -28,7 +28,11 @@ KeyboardKeycode keymapUsb(uint8_t code) { switch (code) { % for km in sorted(keymap, key=operator.attrgetter("mcu_code")): - case ${km.mcu_code}: return ${km.arduino_name}; + % if km.usb_key.is_modifier: + case ${km.mcu_code}: return ${km.usb_key.arduino_modifier_code}; // ${km.web_name} + % else: + case ${km.mcu_code}: return ${km.usb_key.code}; // ${km.web_name} + % endif % endfor default: return KEY_ERROR_UNDEFINED; } @@ -1,108 +1,108 @@ -web_name,mcu_code,arduino_name,usb_key,ps2_key,at1_code,x11_names -KeyA,1,KEY_A,0x04,reg:0x1c,0x1e,"^XK_A,XK_a" -KeyB,2,KEY_B,0x05,reg:0x32,0x30,"^XK_B,XK_b" -KeyC,3,KEY_C,0x06,reg:0x21,0x2e,"^XK_C,XK_c" -KeyD,4,KEY_D,0x07,reg:0x23,0x20,"^XK_D,XK_d" -KeyE,5,KEY_E,0x08,reg:0x24,0x12,"^XK_E,XK_e" -KeyF,6,KEY_F,0x09,reg:0x2b,0x21,"^XK_F,XK_f" -KeyG,7,KEY_G,0x0a,reg:0x34,0x22,"^XK_G,XK_g" -KeyH,8,KEY_H,0x0b,reg:0x33,0x23,"^XK_H,XK_h" -KeyI,9,KEY_I,0x0c,reg:0x43,0x17,"^XK_I,XK_i" -KeyJ,10,KEY_J,0x0d,reg:0x3b,0x24,"^XK_J,XK_j" -KeyK,11,KEY_K,0x0e,reg:0x42,0x25,"^XK_K,XK_k" -KeyL,12,KEY_L,0x0f,reg:0x4b,0x26,"^XK_L,XK_l" -KeyM,13,KEY_M,0x10,reg:0x3a,0x32,"^XK_M,XK_m" -KeyN,14,KEY_N,0x11,reg:0x31,0x31,"^XK_N,XK_n" -KeyO,15,KEY_O,0x12,reg:0x44,0x18,"^XK_O,XK_o" -KeyP,16,KEY_P,0x13,reg:0x4d,0x19,"^XK_P,XK_p" -KeyQ,17,KEY_Q,0x14,reg:0x15,0x10,"^XK_Q,XK_q" -KeyR,18,KEY_R,0x15,reg:0x2d,0x13,"^XK_R,XK_r" -KeyS,19,KEY_S,0x16,reg:0x1b,0x1f,"^XK_S,XK_s" -KeyT,20,KEY_T,0x17,reg:0x2c,0x14,"^XK_T,XK_t" -KeyU,21,KEY_U,0x18,reg:0x3c,0x16,"^XK_U,XK_u" -KeyV,22,KEY_V,0x19,reg:0x2a,0x2f,"^XK_V,XK_v" -KeyW,23,KEY_W,0x1a,reg:0x1d,0x11,"^XK_W,XK_w" -KeyX,24,KEY_X,0x1b,reg:0x22,0x2d,"^XK_X,XK_x" -KeyY,25,KEY_Y,0x1c,reg:0x35,0x15,"^XK_Y,XK_y" -KeyZ,26,KEY_Z,0x1d,reg:0x1a,0x2c,"^XK_Z,XK_z" -Digit1,27,KEY_1,0x1e,reg:0x16,0x02,"XK_1,^XK_exclam" -Digit2,28,KEY_2,0x1f,reg:0x1e,0x03,"XK_2,^XK_at" -Digit3,29,KEY_3,0x20,reg:0x26,0x04,"XK_3,^XK_numbersign" -Digit4,30,KEY_4,0x21,reg:0x25,0x05,"XK_4,^XK_dollar" -Digit5,31,KEY_5,0x22,reg:0x2e,0x06,"XK_5,^XK_percent" -Digit6,32,KEY_6,0x23,reg:0x36,0x07,"XK_6,^XK_asciicircum" -Digit7,33,KEY_7,0x24,reg:0x3d,0x08,"XK_7,^XK_ampersand" -Digit8,34,KEY_8,0x25,reg:0x3e,0x09,"XK_8,^XK_asterisk" -Digit9,35,KEY_9,0x26,reg:0x46,0x0a,"XK_9,^XK_parenleft" -Digit0,36,KEY_0,0x27,reg:0x45,0x0b,"XK_0,^XK_parenright" -Enter,37,KEY_ENTER,0x28,reg:0x5a,0x1c,XK_Return -Escape,38,KEY_ESC,0x29,reg:0x76,0x01,XK_Escape -Backspace,39,KEY_BACKSPACE,0x2a,reg:0x66,0x0e,XK_BackSpace -Tab,40,KEY_TAB,0x2b,reg:0x0d,0x0f,XK_Tab -Space,41,KEY_SPACE,0x2c,reg:0x29,0x39,XK_space -Minus,42,KEY_MINUS,0x2d,reg:0x4e,0x0c,"XK_minus,^XK_underscore" -Equal,43,KEY_EQUAL,0x2e,reg:0x55,0x0d,"XK_equal,^XK_plus" -BracketLeft,44,KEY_LEFT_BRACE,0x2f,reg:0x54,0x1a,"XK_bracketleft,^XK_braceleft" -BracketRight,45,KEY_RIGHT_BRACE,0x30,reg:0x5b,0x1b,"XK_bracketright,^XK_braceright" -Backslash,46,KEY_BACKSLASH,0x31,reg:0x5d,0x2b,"XK_backslash,^XK_bar" -Semicolon,47,KEY_SEMICOLON,0x33,reg:0x4c,0x27,"XK_semicolon,^XK_colon" -Quote,48,KEY_QUOTE,0x34,reg:0x52,0x28,"XK_apostrophe,^XK_quotedbl" -Backquote,49,KEY_TILDE,0x35,reg:0x0e,0x29,"XK_grave,^XK_asciitilde" -Comma,50,KEY_COMMA,0x36,reg:0x41,0x33,"XK_comma,^XK_less" -Period,51,KEY_PERIOD,0x37,reg:0x49,0x34,"XK_period,^XK_greater" -Slash,52,KEY_SLASH,0x38,reg:0x4a,0x35,"XK_slash,^XK_question" -CapsLock,53,KEY_CAPS_LOCK,0x39,reg:0x58,0x3a,XK_Caps_Lock -F1,54,KEY_F1,0x3a,reg:0x05,0x3b,XK_F1 -F2,55,KEY_F2,0x3b,reg:0x06,0x3c,XK_F2 -F3,56,KEY_F3,0x3c,reg:0x04,0x3d,XK_F3 -F4,57,KEY_F4,0x3d,reg:0x0c,0x3e,XK_F4 -F5,58,KEY_F5,0x3e,reg:0x03,0x3f,XK_F5 -F6,59,KEY_F6,0x3f,reg:0x0b,0x40,XK_F6 -F7,60,KEY_F7,0x40,reg:0x83,0x41,XK_F7 -F8,61,KEY_F8,0x41,reg:0x0a,0x42,XK_F8 -F9,62,KEY_F9,0x42,reg:0x01,0x43,XK_F9 -F10,63,KEY_F10,0x43,reg:0x09,0x44,XK_F10 -F11,64,KEY_F11,0x44,reg:0x78,0x57,XK_F11 -F12,65,KEY_F12,0x45,reg:0x07,0x58,XK_F12 -PrintScreen,66,KEY_PRINT,0x46,print:0xff,0x54,XK_Sys_Req -Insert,67,KEY_INSERT,0x49,spec:0x70,0xe052,XK_Insert -Home,68,KEY_HOME,0x4a,spec:0x6c,0xe047,XK_Home -PageUp,69,KEY_PAGE_UP,0x4b,spec:0x7d,0xe049,XK_Page_Up -Delete,70,KEY_DELETE,0x4c,spec:0x71,0xe053,XK_Delete -End,71,KEY_END,0x4d,spec:0x69,0xe04f,XK_End -PageDown,72,KEY_PAGE_DOWN,0x4e,spec:0x7a,0xe051,XK_Page_Down -ArrowRight,73,KEY_RIGHT_ARROW,0x4f,spec:0x74,0xe04d,XK_Right -ArrowLeft,74,KEY_LEFT_ARROW,0x50,spec:0x6b,0xe04b,XK_Left -ArrowDown,75,KEY_DOWN_ARROW,0x51,spec:0x72,0xe050,XK_Down -ArrowUp,76,KEY_UP_ARROW,0x52,spec:0x75,0xe048,XK_Up -ControlLeft,77,KEY_LEFT_CTRL,^0x01,reg:0x14,0x1d,XK_Control_L -ShiftLeft,78,KEY_LEFT_SHIFT,^0x02,reg:0x12,0x2a,XK_Shift_L -AltLeft,79,KEY_LEFT_ALT,^0x04,reg:0x11,0x38,XK_Alt_L -MetaLeft,80,KEY_LEFT_GUI,^0x08,spec:0x1f,0xe05b,"XK_Meta_L,XK_Super_L" -ControlRight,81,KEY_RIGHT_CTRL,^0x10,spec:0x14,0xe01d,XK_Control_R -ShiftRight,82,KEY_RIGHT_SHIFT,^0x20,reg:0x59,0x36,XK_Shift_R -AltRight,83,KEY_RIGHT_ALT,^0x40,spec:0x11,0xe038,"XK_Alt_R,XK_ISO_Level3_Shift" -MetaRight,84,KEY_RIGHT_GUI,^0x80,spec:0x27,0xe05c,"XK_Meta_R,XK_Super_R" -Pause,85,KEY_PAUSE,0x48,pause:0xff,0xe046,XK_Pause -ScrollLock,86,KEY_SCROLL_LOCK,0x47,reg:0x7e,0x46,XK_Scroll_Lock -NumLock,87,KEY_NUM_LOCK,0x53,reg:0x77,0x45,XK_Num_Lock -ContextMenu,88,KEY_MENU,0x65,spec:0x2f,0xe05d,XK_Menu -NumpadDivide,89,KEYPAD_DIVIDE,0x54,spec:0x4a,0xe035,XK_KP_Divide -NumpadMultiply,90,KEYPAD_MULTIPLY,0x55,reg:0x7c,0x37,XK_multiply -NumpadSubtract,91,KEYPAD_SUBTRACT,0x56,reg:0x7b,0x4a,XK_KP_Subtract -NumpadAdd,92,KEYPAD_ADD,0x57,reg:0x79,0x4e,XK_KP_Add -NumpadEnter,93,KEYPAD_ENTER,0x58,spec:0x5a,0xe01c,XK_KP_Enter -Numpad1,94,KEYPAD_1,0x59,reg:0x69,0x4f,XK_KP_1 -Numpad2,95,KEYPAD_2,0x5a,reg:0x72,0x50,XK_KP_2 -Numpad3,96,KEYPAD_3,0x5b,reg:0x7a,0x51,XK_KP_3 -Numpad4,97,KEYPAD_4,0x5c,reg:0x6b,0x4b,XK_KP_4 -Numpad5,98,KEYPAD_5,0x5d,reg:0x73,0x4c,XK_KP_5 -Numpad6,99,KEYPAD_6,0x5e,reg:0x74,0x4d,XK_KP_6 -Numpad7,100,KEYPAD_7,0x5f,reg:0x6c,0x47,XK_KP_7 -Numpad8,101,KEYPAD_8,0x60,reg:0x75,0x48,XK_KP_8 -Numpad9,102,KEYPAD_9,0x61,reg:0x7d,0x49,XK_KP_9 -Numpad0,103,KEYPAD_0,0x62,reg:0x70,0x52,XK_KP_0 -NumpadDecimal,104,KEYPAD_DOT,0x63,reg:0x71,0x53,XK_KP_Decimal -Power,105,KEY_POWER,0x66,spec:0x5e,0xe05e,XK_XF86_Sleep -IntlBackslash,106,KEY_NON_US,0x64,reg:0x61,0x56, -IntlYen,107,KEY_INTERNATIONAL3,0x89,reg:0x6a,0x7d, +web_name,mcu_code,usb_key,ps2_key,at1_code,x11_names +KeyA,1,0x04,reg:0x1c,0x1e,"^XK_A,XK_a" +KeyB,2,0x05,reg:0x32,0x30,"^XK_B,XK_b" +KeyC,3,0x06,reg:0x21,0x2e,"^XK_C,XK_c" +KeyD,4,0x07,reg:0x23,0x20,"^XK_D,XK_d" +KeyE,5,0x08,reg:0x24,0x12,"^XK_E,XK_e" +KeyF,6,0x09,reg:0x2b,0x21,"^XK_F,XK_f" +KeyG,7,0x0a,reg:0x34,0x22,"^XK_G,XK_g" +KeyH,8,0x0b,reg:0x33,0x23,"^XK_H,XK_h" +KeyI,9,0x0c,reg:0x43,0x17,"^XK_I,XK_i" +KeyJ,10,0x0d,reg:0x3b,0x24,"^XK_J,XK_j" +KeyK,11,0x0e,reg:0x42,0x25,"^XK_K,XK_k" +KeyL,12,0x0f,reg:0x4b,0x26,"^XK_L,XK_l" +KeyM,13,0x10,reg:0x3a,0x32,"^XK_M,XK_m" +KeyN,14,0x11,reg:0x31,0x31,"^XK_N,XK_n" +KeyO,15,0x12,reg:0x44,0x18,"^XK_O,XK_o" +KeyP,16,0x13,reg:0x4d,0x19,"^XK_P,XK_p" +KeyQ,17,0x14,reg:0x15,0x10,"^XK_Q,XK_q" +KeyR,18,0x15,reg:0x2d,0x13,"^XK_R,XK_r" +KeyS,19,0x16,reg:0x1b,0x1f,"^XK_S,XK_s" +KeyT,20,0x17,reg:0x2c,0x14,"^XK_T,XK_t" +KeyU,21,0x18,reg:0x3c,0x16,"^XK_U,XK_u" +KeyV,22,0x19,reg:0x2a,0x2f,"^XK_V,XK_v" +KeyW,23,0x1a,reg:0x1d,0x11,"^XK_W,XK_w" +KeyX,24,0x1b,reg:0x22,0x2d,"^XK_X,XK_x" +KeyY,25,0x1c,reg:0x35,0x15,"^XK_Y,XK_y" +KeyZ,26,0x1d,reg:0x1a,0x2c,"^XK_Z,XK_z" +Digit1,27,0x1e,reg:0x16,0x02,"XK_1,^XK_exclam" +Digit2,28,0x1f,reg:0x1e,0x03,"XK_2,^XK_at" +Digit3,29,0x20,reg:0x26,0x04,"XK_3,^XK_numbersign" +Digit4,30,0x21,reg:0x25,0x05,"XK_4,^XK_dollar" +Digit5,31,0x22,reg:0x2e,0x06,"XK_5,^XK_percent" +Digit6,32,0x23,reg:0x36,0x07,"XK_6,^XK_asciicircum" +Digit7,33,0x24,reg:0x3d,0x08,"XK_7,^XK_ampersand" +Digit8,34,0x25,reg:0x3e,0x09,"XK_8,^XK_asterisk" +Digit9,35,0x26,reg:0x46,0x0a,"XK_9,^XK_parenleft" +Digit0,36,0x27,reg:0x45,0x0b,"XK_0,^XK_parenright" +Enter,37,0x28,reg:0x5a,0x1c,XK_Return +Escape,38,0x29,reg:0x76,0x01,XK_Escape +Backspace,39,0x2a,reg:0x66,0x0e,XK_BackSpace +Tab,40,0x2b,reg:0x0d,0x0f,XK_Tab +Space,41,0x2c,reg:0x29,0x39,XK_space +Minus,42,0x2d,reg:0x4e,0x0c,"XK_minus,^XK_underscore" +Equal,43,0x2e,reg:0x55,0x0d,"XK_equal,^XK_plus" +BracketLeft,44,0x2f,reg:0x54,0x1a,"XK_bracketleft,^XK_braceleft" +BracketRight,45,0x30,reg:0x5b,0x1b,"XK_bracketright,^XK_braceright" +Backslash,46,0x31,reg:0x5d,0x2b,"XK_backslash,^XK_bar" +Semicolon,47,0x33,reg:0x4c,0x27,"XK_semicolon,^XK_colon" +Quote,48,0x34,reg:0x52,0x28,"XK_apostrophe,^XK_quotedbl" +Backquote,49,0x35,reg:0x0e,0x29,"XK_grave,^XK_asciitilde" +Comma,50,0x36,reg:0x41,0x33,"XK_comma,^XK_less" +Period,51,0x37,reg:0x49,0x34,"XK_period,^XK_greater" +Slash,52,0x38,reg:0x4a,0x35,"XK_slash,^XK_question" +CapsLock,53,0x39,reg:0x58,0x3a,XK_Caps_Lock +F1,54,0x3a,reg:0x05,0x3b,XK_F1 +F2,55,0x3b,reg:0x06,0x3c,XK_F2 +F3,56,0x3c,reg:0x04,0x3d,XK_F3 +F4,57,0x3d,reg:0x0c,0x3e,XK_F4 +F5,58,0x3e,reg:0x03,0x3f,XK_F5 +F6,59,0x3f,reg:0x0b,0x40,XK_F6 +F7,60,0x40,reg:0x83,0x41,XK_F7 +F8,61,0x41,reg:0x0a,0x42,XK_F8 +F9,62,0x42,reg:0x01,0x43,XK_F9 +F10,63,0x43,reg:0x09,0x44,XK_F10 +F11,64,0x44,reg:0x78,0x57,XK_F11 +F12,65,0x45,reg:0x07,0x58,XK_F12 +PrintScreen,66,0x46,print:0xff,0x54,XK_Sys_Req +Insert,67,0x49,spec:0x70,0xe052,XK_Insert +Home,68,0x4a,spec:0x6c,0xe047,XK_Home +PageUp,69,0x4b,spec:0x7d,0xe049,XK_Page_Up +Delete,70,0x4c,spec:0x71,0xe053,XK_Delete +End,71,0x4d,spec:0x69,0xe04f,XK_End +PageDown,72,0x4e,spec:0x7a,0xe051,XK_Page_Down +ArrowRight,73,0x4f,spec:0x74,0xe04d,XK_Right +ArrowLeft,74,0x50,spec:0x6b,0xe04b,XK_Left +ArrowDown,75,0x51,spec:0x72,0xe050,XK_Down +ArrowUp,76,0x52,spec:0x75,0xe048,XK_Up +ControlLeft,77,^0x01,reg:0x14,0x1d,XK_Control_L +ShiftLeft,78,^0x02,reg:0x12,0x2a,XK_Shift_L +AltLeft,79,^0x04,reg:0x11,0x38,XK_Alt_L +MetaLeft,80,^0x08,spec:0x1f,0xe05b,"XK_Meta_L,XK_Super_L" +ControlRight,81,^0x10,spec:0x14,0xe01d,XK_Control_R +ShiftRight,82,^0x20,reg:0x59,0x36,XK_Shift_R +AltRight,83,^0x40,spec:0x11,0xe038,"XK_Alt_R,XK_ISO_Level3_Shift" +MetaRight,84,^0x80,spec:0x27,0xe05c,"XK_Meta_R,XK_Super_R" +Pause,85,0x48,pause:0xff,0xe046,XK_Pause +ScrollLock,86,0x47,reg:0x7e,0x46,XK_Scroll_Lock +NumLock,87,0x53,reg:0x77,0x45,XK_Num_Lock +ContextMenu,88,0x65,spec:0x2f,0xe05d,XK_Menu +NumpadDivide,89,0x54,spec:0x4a,0xe035,XK_KP_Divide +NumpadMultiply,90,0x55,reg:0x7c,0x37,XK_multiply +NumpadSubtract,91,0x56,reg:0x7b,0x4a,XK_KP_Subtract +NumpadAdd,92,0x57,reg:0x79,0x4e,XK_KP_Add +NumpadEnter,93,0x58,spec:0x5a,0xe01c,XK_KP_Enter +Numpad1,94,0x59,reg:0x69,0x4f,XK_KP_1 +Numpad2,95,0x5a,reg:0x72,0x50,XK_KP_2 +Numpad3,96,0x5b,reg:0x7a,0x51,XK_KP_3 +Numpad4,97,0x5c,reg:0x6b,0x4b,XK_KP_4 +Numpad5,98,0x5d,reg:0x73,0x4c,XK_KP_5 +Numpad6,99,0x5e,reg:0x74,0x4d,XK_KP_6 +Numpad7,100,0x5f,reg:0x6c,0x47,XK_KP_7 +Numpad8,101,0x60,reg:0x75,0x48,XK_KP_8 +Numpad9,102,0x61,reg:0x7d,0x49,XK_KP_9 +Numpad0,103,0x62,reg:0x70,0x52,XK_KP_0 +NumpadDecimal,104,0x63,reg:0x71,0x53,XK_KP_Decimal +Power,105,0x66,spec:0x5e,0xe05e,XK_XF86_Sleep +IntlBackslash,106,0x64,reg:0x61,0x56, +IntlYen,107,0x89,reg:0x6a,0x7d, diff --git a/testenv/linters/vulture-wl.py b/testenv/linters/vulture-wl.py index 7e5a6d6a..75fe491b 100644 --- a/testenv/linters/vulture-wl.py +++ b/testenv/linters/vulture-wl.py @@ -26,7 +26,6 @@ _AtxApiPart.switch_power _KeyMapping.web_name _KeyMapping.mcu_code -_KeyMapping.arduino_name _KeyMapping.usb_key _KeyMapping.ps2_key _KeyMapping.at1_code |