Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
634 lines (623 sloc) 32.6 KB
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
#
# Easy AVR USB Keyboard Firmware Keymapper
# Copyright (C) 2013-2018 David Howland
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
"""This module contains the list of scancodes and their associations to
various values and symbols.
"""
from collections import namedtuple
import wx
# All USB HID scancodes, as defined by LUFA, except those that aren't implemented,
# and extra codes implemented by EasyAVR
SCDef = namedtuple('SCDef', ['display', 'value', 'hint'])
scancodes = {
"0": SCDef(" ", 0x00, " "),
# "HID_KEYBOARD_SC_ERROR_ROLLOVER": SCDef("", 0x01, ""),
# "HID_KEYBOARD_SC_POST_FAIL": SCDef("", 0x02, ""),
# "HID_KEYBOARD_SC_ERROR_UNDEFINED": SCDef("", 0x03, ""),
"HID_KEYBOARD_SC_A": SCDef("A", 0x04, "A"),
"HID_KEYBOARD_SC_B": SCDef("B", 0x05, "B"),
"HID_KEYBOARD_SC_C": SCDef("C", 0x06, "C"),
"HID_KEYBOARD_SC_D": SCDef("D", 0x07, "D"),
"HID_KEYBOARD_SC_E": SCDef("E", 0x08, "E"),
"HID_KEYBOARD_SC_F": SCDef("F", 0x09, "F"),
"HID_KEYBOARD_SC_G": SCDef("G", 0x0A, "G"),
"HID_KEYBOARD_SC_H": SCDef("H", 0x0B, "H"),
"HID_KEYBOARD_SC_I": SCDef("I", 0x0C, "I"),
"HID_KEYBOARD_SC_J": SCDef("J", 0x0D, "J"),
"HID_KEYBOARD_SC_K": SCDef("K", 0x0E, "K"),
"HID_KEYBOARD_SC_L": SCDef("L", 0x0F, "L"),
"HID_KEYBOARD_SC_M": SCDef("M", 0x10, "M"),
"HID_KEYBOARD_SC_N": SCDef("N", 0x11, "N"),
"HID_KEYBOARD_SC_O": SCDef("O", 0x12, "O"),
"HID_KEYBOARD_SC_P": SCDef("P", 0x13, "P"),
"HID_KEYBOARD_SC_Q": SCDef("Q", 0x14, "Q"),
"HID_KEYBOARD_SC_R": SCDef("R", 0x15, "R"),
"HID_KEYBOARD_SC_S": SCDef("S", 0x16, "S"),
"HID_KEYBOARD_SC_T": SCDef("T", 0x17, "T"),
"HID_KEYBOARD_SC_U": SCDef("U", 0x18, "U"),
"HID_KEYBOARD_SC_V": SCDef("V", 0x19, "V"),
"HID_KEYBOARD_SC_W": SCDef("W", 0x1A, "W"),
"HID_KEYBOARD_SC_X": SCDef("X", 0x1B, "X"),
"HID_KEYBOARD_SC_Y": SCDef("Y", 0x1C, "Y"),
"HID_KEYBOARD_SC_Z": SCDef("Z", 0x1D, "Z"),
"HID_KEYBOARD_SC_1_AND_EXCLAMATION": SCDef("!\n1", 0x1E, "1!"),
"HID_KEYBOARD_SC_2_AND_AT": SCDef("@\n2", 0x1F, "2@"),
"HID_KEYBOARD_SC_3_AND_HASHMARK": SCDef("#\n3", 0x20, "3#"),
"HID_KEYBOARD_SC_4_AND_DOLLAR": SCDef("$\n4", 0x21, "4$"),
"HID_KEYBOARD_SC_5_AND_PERCENTAGE": SCDef("%\n5", 0x22, "5%"),
"HID_KEYBOARD_SC_6_AND_CARET": SCDef("^\n6", 0x23, "6^"),
"HID_KEYBOARD_SC_7_AND_AND_AMPERSAND": SCDef("&\n7", 0x24, "7&"),
"HID_KEYBOARD_SC_8_AND_ASTERISK": SCDef("*\n8", 0x25, "8*"),
"HID_KEYBOARD_SC_9_AND_OPENING_PARENTHESIS": SCDef("(\n9", 0x26, "9("),
"HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS": SCDef(")\n0", 0x27, "0)"),
"HID_KEYBOARD_SC_ENTER": SCDef("Enter", 0x28, "Enter"),
"HID_KEYBOARD_SC_ESCAPE": SCDef("Esc", 0x29, "Esc"),
"HID_KEYBOARD_SC_BACKSPACE": SCDef("Backspace", 0x2A, "Bksp"),
"HID_KEYBOARD_SC_TAB": SCDef("Tab", 0x2B, "Tab"),
"HID_KEYBOARD_SC_SPACE": SCDef("Space", 0x2C, "Space"),
"HID_KEYBOARD_SC_MINUS_AND_UNDERSCORE": SCDef("_\n-", 0x2D, "-_"),
"HID_KEYBOARD_SC_EQUAL_AND_PLUS": SCDef("+\n=", 0x2E, "=+"),
"HID_KEYBOARD_SC_OPENING_BRACKET_AND_OPENING_BRACE": SCDef("{\n[", 0x2F, "[{"),
"HID_KEYBOARD_SC_CLOSING_BRACKET_AND_CLOSING_BRACE": SCDef("}\n]", 0x30, "]}"),
"HID_KEYBOARD_SC_BACKSLASH_AND_PIPE": SCDef("|\n\\", 0x31, "\\|"),
"HID_KEYBOARD_SC_NON_US_HASHMARK_AND_TILDE": SCDef("~\n#", 0x32, "#~"),
"HID_KEYBOARD_SC_SEMICOLON_AND_COLON": SCDef(":\n;", 0x33, ";:"),
"HID_KEYBOARD_SC_APOSTROPHE_AND_QUOTE": SCDef("\"\n'", 0x34, "'\""),
"HID_KEYBOARD_SC_GRAVE_ACCENT_AND_TILDE": SCDef("~\n`", 0x35, "`~"),
"HID_KEYBOARD_SC_COMMA_AND_LESS_THAN_SIGN": SCDef("<\n,", 0x36, ",<"),
"HID_KEYBOARD_SC_DOT_AND_GREATER_THAN_SIGN": SCDef(">\n.", 0x37, ".>"),
"HID_KEYBOARD_SC_SLASH_AND_QUESTION_MARK": SCDef("?\n/", 0x38, "/?"),
"HID_KEYBOARD_SC_CAPS_LOCK": SCDef("Caps\nLock", 0x39, "Caps"),
"HID_KEYBOARD_SC_F1": SCDef("F1", 0x3A, "F1"),
"HID_KEYBOARD_SC_F2": SCDef("F2", 0x3B, "F2"),
"HID_KEYBOARD_SC_F3": SCDef("F3", 0x3C, "F3"),
"HID_KEYBOARD_SC_F4": SCDef("F4", 0x3D, "F4"),
"HID_KEYBOARD_SC_F5": SCDef("F5", 0x3E, "F5"),
"HID_KEYBOARD_SC_F6": SCDef("F6", 0x3F, "F6"),
"HID_KEYBOARD_SC_F7": SCDef("F7", 0x40, "F7"),
"HID_KEYBOARD_SC_F8": SCDef("F8", 0x41, "F8"),
"HID_KEYBOARD_SC_F9": SCDef("F9", 0x42, "F9"),
"HID_KEYBOARD_SC_F10": SCDef("F10", 0x43, "F10"),
"HID_KEYBOARD_SC_F11": SCDef("F11", 0x44, "F11"),
"HID_KEYBOARD_SC_F12": SCDef("F12", 0x45, "F12"),
"HID_KEYBOARD_SC_PRINT_SCREEN": SCDef("Print\nScreen", 0x46, "PtSc"),
"HID_KEYBOARD_SC_SCROLL_LOCK": SCDef("Scroll\nLock", 0x47, "ScLk"),
"HID_KEYBOARD_SC_PAUSE": SCDef("Pause", 0x48, "Paus"),
"HID_KEYBOARD_SC_INSERT": SCDef("Insert", 0x49, "Ins"),
"HID_KEYBOARD_SC_HOME": SCDef("Home", 0x4A, "Home"),
"HID_KEYBOARD_SC_PAGE_UP": SCDef("Page\nUp", 0x4B, "PgUp"),
"HID_KEYBOARD_SC_DELETE": SCDef("Delete", 0x4C, "Del"),
"HID_KEYBOARD_SC_END": SCDef("End", 0x4D, "End"),
"HID_KEYBOARD_SC_PAGE_DOWN": SCDef("Page\nDown", 0x4E, "PgDn"),
"HID_KEYBOARD_SC_RIGHT_ARROW": SCDef("Right", 0x4F, "Rt"),
"HID_KEYBOARD_SC_LEFT_ARROW": SCDef("Left", 0x50, "Lf"),
"HID_KEYBOARD_SC_DOWN_ARROW": SCDef("Down", 0x51, "Dn"),
"HID_KEYBOARD_SC_UP_ARROW": SCDef("Up", 0x52, "Up"),
"HID_KEYBOARD_SC_NUM_LOCK": SCDef("Num\nLock", 0x53, "NmLk"),
"HID_KEYBOARD_SC_KEYPAD_SLASH": SCDef("/", 0x54, "/"),
"HID_KEYBOARD_SC_KEYPAD_ASTERISK": SCDef("*", 0x55, "*"),
"HID_KEYBOARD_SC_KEYPAD_MINUS": SCDef("-", 0x56, "-"),
"HID_KEYBOARD_SC_KEYPAD_PLUS": SCDef("+", 0x57, "+"),
"HID_KEYBOARD_SC_KEYPAD_ENTER": SCDef("Enter", 0x58, "Ent"),
"HID_KEYBOARD_SC_KEYPAD_1_AND_END": SCDef("1\nEnd", 0x59, "1"),
"HID_KEYBOARD_SC_KEYPAD_2_AND_DOWN_ARROW": SCDef("2\nDown", 0x5A, "2"),
"HID_KEYBOARD_SC_KEYPAD_3_AND_PAGE_DOWN": SCDef("3\nPgDn", 0x5B, "3"),
"HID_KEYBOARD_SC_KEYPAD_4_AND_LEFT_ARROW": SCDef("4\nLeft", 0x5C, "4"),
"HID_KEYBOARD_SC_KEYPAD_5": SCDef("5", 0x5D, "5"),
"HID_KEYBOARD_SC_KEYPAD_6_AND_RIGHT_ARROW": SCDef("6\nRight", 0x5E, "6"),
"HID_KEYBOARD_SC_KEYPAD_7_AND_HOME": SCDef("7\nHome", 0x5F, "7"),
"HID_KEYBOARD_SC_KEYPAD_8_AND_UP_ARROW": SCDef("8\nUp", 0x60, "8"),
"HID_KEYBOARD_SC_KEYPAD_9_AND_PAGE_UP": SCDef("9\nPgUp", 0x61, "9"),
"HID_KEYBOARD_SC_KEYPAD_0_AND_INSERT": SCDef("0\nIns", 0x62, "0"),
"HID_KEYBOARD_SC_KEYPAD_DOT_AND_DELETE": SCDef(".\nDel", 0x63, "."),
"HID_KEYBOARD_SC_NON_US_BACKSLASH_AND_PIPE": SCDef("|\n\\", 0x64, "\\|"),
"HID_KEYBOARD_SC_APPLICATION": SCDef("App", 0x65, "App"),
"HID_KEYBOARD_SC_POWER": SCDef("Power\n(Mac)", 0x66, "Pwr"),
"HID_KEYBOARD_SC_KEYPAD_EQUAL_SIGN": SCDef("=\n(Mac)", 0x67, "="),
"HID_KEYBOARD_SC_F13": SCDef("F13", 0x68, "F13"),
"HID_KEYBOARD_SC_F14": SCDef("F14", 0x69, "F14"),
"HID_KEYBOARD_SC_F15": SCDef("F15", 0x6A, "F15"),
"HID_KEYBOARD_SC_F16": SCDef("F16", 0x6B, "F16"),
"HID_KEYBOARD_SC_F17": SCDef("F17", 0x6C, "F17"),
"HID_KEYBOARD_SC_F18": SCDef("F18", 0x6D, "F18"),
"HID_KEYBOARD_SC_F19": SCDef("F19", 0x6E, "F19"),
"HID_KEYBOARD_SC_F20": SCDef("F20", 0x6F, "F20"),
"HID_KEYBOARD_SC_F21": SCDef("F21", 0x70, "F21"),
"HID_KEYBOARD_SC_F22": SCDef("F22", 0x71, "F22"),
"HID_KEYBOARD_SC_F23": SCDef("F23", 0x72, "F23"),
"HID_KEYBOARD_SC_F24": SCDef("F24", 0x73, "F24"),
# "HID_KEYBOARD_SC_EXECUTE": SCDef("Execute\n(Unix)", 0x74, ""),
# "HID_KEYBOARD_SC_HELP": SCDef("Help\n(Unix)", 0x75, ""),
# "HID_KEYBOARD_SC_MANU": SCDef("Menu\n(Unix)", 0x76, ""),
# "HID_KEYBOARD_SC_SELECT": SCDef("Select\n(Unix)", 0x77, ""),
# "HID_KEYBOARD_SC_STOP": SCDef("Stop\n(Unix)", 0x78, ""),
# "HID_KEYBOARD_SC_AGAIN": SCDef("Again\n(Unix)", 0x79, ""),
# "HID_KEYBOARD_SC_UNDO": SCDef("Undo\n(Unix)", 0x7A, ""),
# "HID_KEYBOARD_SC_CUT": SCDef("Cut\n(Unix)", 0x7B, ""),
# "HID_KEYBOARD_SC_COPY": SCDef("Copy\n(Unix)", 0x7C, ""),
# "HID_KEYBOARD_SC_PASTE": SCDef("Paste\n(Unix)", 0x7D, ""),
# "HID_KEYBOARD_SC_FIND": SCDef("Find\n(Unix)", 0x7E, ""),
# "HID_KEYBOARD_SC_MUTE": SCDef("Mute\n(Mac)", 0x7F, ""),
# "HID_KEYBOARD_SC_VOLUME_UP": SCDef("Vol+\n(Mac)", 0x80, ""),
# "HID_KEYBOARD_SC_VOLUME_DOWN": SCDef("Vol-\n(Mac)", 0x81, ""),
"HID_KEYBOARD_SC_LOCKING_CAPS_LOCK": SCDef("Locking\nCaps", 0x82, "Caps"),
"HID_KEYBOARD_SC_LOCKING_NUM_LOCK": SCDef("Locking\nNum", 0x83, "NmLk"),
"HID_KEYBOARD_SC_LOCKING_SCROLL_LOCK": SCDef("Locking\nScroll", 0x84, "ScLk"),
# "HID_KEYBOARD_SC_KEYPAD_COMMA": SCDef("", 0x85, ""),
# "HID_KEYBOARD_SC_KEYPAD_EQUAL_SIGN_AS400": SCDef("", 0x86, ""),
# "HID_KEYBOARD_SC_INTERNATIONAL1": SCDef("", 0x87, ""),
# "HID_KEYBOARD_SC_INTERNATIONAL2": SCDef("", 0x88, ""),
# "HID_KEYBOARD_SC_INTERNATIONAL3": SCDef("", 0x89, ""),
# "HID_KEYBOARD_SC_INTERNATIONAL4": SCDef("", 0x8A, ""),
# "HID_KEYBOARD_SC_INTERNATIONAL5": SCDef("", 0x8B, ""),
# "HID_KEYBOARD_SC_INTERNATIONAL6": SCDef("", 0x8C, ""),
# "HID_KEYBOARD_SC_INTERNATIONAL7": SCDef("", 0x8D, ""),
# "HID_KEYBOARD_SC_INTERNATIONAL8": SCDef("", 0x8E, ""),
# "HID_KEYBOARD_SC_INTERNATIONAL9": SCDef("", 0x8F, ""),
# "HID_KEYBOARD_SC_LANG1": SCDef("", 0x90, ""),
# "HID_KEYBOARD_SC_LANG2": SCDef("", 0x91, ""),
# "HID_KEYBOARD_SC_LANG3": SCDef("", 0x92, ""),
# "HID_KEYBOARD_SC_LANG4": SCDef("", 0x93, ""),
# "HID_KEYBOARD_SC_LANG5": SCDef("", 0x94, ""),
# "HID_KEYBOARD_SC_LANG6": SCDef("", 0x95, ""),
# "HID_KEYBOARD_SC_LANG7": SCDef("", 0x96, ""),
# "HID_KEYBOARD_SC_LANG8": SCDef("", 0x97, ""),
# "HID_KEYBOARD_SC_LANG9": SCDef("", 0x98, ""),
# "HID_KEYBOARD_SC_ALTERNATE_ERASE": SCDef("", 0x99, ""),
# "HID_KEYBOARD_SC_SISREQ": SCDef("", 0x9A, ""),
# "HID_KEYBOARD_SC_CANCEL": SCDef("", 0x9B, ""),
# "HID_KEYBOARD_SC_CLEAR": SCDef("", 0x9C, ""),
# "HID_KEYBOARD_SC_PRIOR": SCDef("", 0x9D, ""),
# "HID_KEYBOARD_SC_RETURN": SCDef("", 0x9E, ""),
# "HID_KEYBOARD_SC_SEPARATOR": SCDef("", 0x9F, ""),
# "HID_KEYBOARD_SC_OUT": SCDef("", 0xA0, ""),
# "HID_KEYBOARD_SC_OPER": SCDef("", 0xA1, ""),
# "HID_KEYBOARD_SC_CLEAR_AND_AGAIN": SCDef("", 0xA2, ""),
# "HID_KEYBOARD_SC_CRSEL_ANDPROPS": SCDef("", 0xA3, ""),
# "HID_KEYBOARD_SC_EXSEL": SCDef("", 0xA4, ""),
# "HID_KEYBOARD_SC_KEYPAD_00": SCDef("", 0xB0, ""),
# "HID_KEYBOARD_SC_KEYPAD_000": SCDef("", 0xB1, ""),
# "HID_KEYBOARD_SC_THOUSANDS_SEPARATOR": SCDef("", 0xB2, ""),
# "HID_KEYBOARD_SC_DECIMAL_SEPARATOR": SCDef("", 0xB3, ""),
# "HID_KEYBOARD_SC_CURRENCY_UNIT": SCDef("", 0xB4, ""),
# "HID_KEYBOARD_SC_CURRENCY_SUB_UNIT": SCDef("", 0xB5, ""),
# "HID_KEYBOARD_SC_KEYPAD_OPENING_PARENTHESIS": SCDef("", 0xB6, ""),
# "HID_KEYBOARD_SC_KEYPAD_CLOSING_PARENTHESIS": SCDef("", 0xB7, ""),
# "HID_KEYBOARD_SC_KEYPAD_OPENING_BRACE": SCDef("", 0xB8, ""),
# "HID_KEYBOARD_SC_KEYPAD_CLOSING_BRACE": SCDef("", 0xB9, ""),
# "HID_KEYBOARD_SC_KEYPAD_TAB": SCDef("", 0xBA, ""),
# "HID_KEYBOARD_SC_KEYPAD_BACKSPACE": SCDef("", 0xBB, ""),
# "HID_KEYBOARD_SC_KEYPAD_A": SCDef("", 0xBC, ""),
# "HID_KEYBOARD_SC_KEYPAD_B": SCDef("", 0xBD, ""),
# "HID_KEYBOARD_SC_KEYPAD_C": SCDef("", 0xBE, ""),
# "HID_KEYBOARD_SC_KEYPAD_D": SCDef("", 0xBF, ""),
# "HID_KEYBOARD_SC_KEYPAD_E": SCDef("", 0xC0, ""),
# "HID_KEYBOARD_SC_KEYPAD_F": SCDef("", 0xC1, ""),
# "HID_KEYBOARD_SC_KEYPAD_XOR": SCDef("", 0xC2, ""),
# "HID_KEYBOARD_SC_KEYPAD_CARET": SCDef("", 0xC3, ""),
# "HID_KEYBOARD_SC_KEYPAD_PERCENTAGE": SCDef("", 0xC4, ""),
# "HID_KEYBOARD_SC_KEYPAD_LESS_THAN_SIGN": SCDef("", 0xC5, ""),
# "HID_KEYBOARD_SC_KEYPAD_GREATER_THAN_SIGN": SCDef("", 0xC6, ""),
# "HID_KEYBOARD_SC_KEYPAD_AMP": SCDef("", 0xC7, ""),
# "HID_KEYBOARD_SC_KEYPAD_AMP_AMP": SCDef("", 0xC8, ""),
# "HID_KEYBOARD_SC_KEYPAD_PIPE": SCDef("", 0xC9, ""),
# "HID_KEYBOARD_SC_KEYPAD_PIPE_PIPE": SCDef("", 0xCA, ""),
# "HID_KEYBOARD_SC_KEYPAD_COLON": SCDef("", 0xCB, ""),
# "HID_KEYBOARD_SC_KEYPAD_HASHMARK": SCDef("", 0xCC, ""),
# "HID_KEYBOARD_SC_KEYPAD_SPACE": SCDef("", 0xCD, ""),
# "HID_KEYBOARD_SC_KEYPAD_AT": SCDef("", 0xCE, ""),
# "HID_KEYBOARD_SC_KEYPAD_EXCLAMATION_SIGN": SCDef("", 0xCF, ""),
# "HID_KEYBOARD_SC_KEYPAD_MEMORY_STORE": SCDef("", 0xD0, ""),
# "HID_KEYBOARD_SC_KEYPAD_MEMORY_RECALL": SCDef("", 0xD1, ""),
# "HID_KEYBOARD_SC_KEYPAD_MEMORY_CLEAR": SCDef("", 0xD2, ""),
# "HID_KEYBOARD_SC_KEYPAD_MEMORY_ADD": SCDef("", 0xD3, ""),
# "HID_KEYBOARD_SC_KEYPAD_MEMORY_SUBTRACT": SCDef("", 0xD4, ""),
# "HID_KEYBOARD_SC_KEYPAD_MEMORY_MULTIPLY": SCDef("", 0xD5, ""),
# "HID_KEYBOARD_SC_KEYPAD_MEMORY_DIVIDE": SCDef("", 0xD6, ""),
# "HID_KEYBOARD_SC_KEYPAD_PLUS_AND_MINUS": SCDef("", 0xD7, ""),
# "HID_KEYBOARD_SC_KEYPAD_CLEAR": SCDef("", 0xD8, ""),
# "HID_KEYBOARD_SC_KEYPAD_CLEAR_ENTRY": SCDef("", 0xD9, ""),
# "HID_KEYBOARD_SC_KEYPAD_BINARY": SCDef("", 0xDA, ""),
# "HID_KEYBOARD_SC_KEYPAD_OCTAL": SCDef("", 0xDB, ""),
# "HID_KEYBOARD_SC_KEYPAD_DECIMAL": SCDef("", 0xDC, ""),
# "HID_KEYBOARD_SC_KEYPAD_HEXADECIMAL": SCDef("", 0xDD, ""),
"HID_KEYBOARD_SC_LEFT_CONTROL": SCDef("L_Ctrl", 0xE0, "Ctrl"),
"HID_KEYBOARD_SC_LEFT_SHIFT": SCDef("L_Shift", 0xE1, "Shift"),
"HID_KEYBOARD_SC_LEFT_ALT": SCDef("L_Alt", 0xE2, "Alt"),
"HID_KEYBOARD_SC_LEFT_GUI": SCDef("L_GUI", 0xE3, "GUI"),
"HID_KEYBOARD_SC_RIGHT_CONTROL": SCDef("R_Ctrl", 0xE4, "Ctrl"),
"HID_KEYBOARD_SC_RIGHT_SHIFT": SCDef("R_Shift", 0xE5, "Shift"),
"HID_KEYBOARD_SC_RIGHT_ALT": SCDef("R_Alt", 0xE6, "Alt"),
"HID_KEYBOARD_SC_RIGHT_GUI": SCDef("R_GUI", 0xE7, "GUI"),
# "Fake" scancodes, never sent over the wire (see config_keymap.h)
"SCANCODE_NEXT_TRACK": SCDef("Next\nTrack", 0x97, "Next"),
"SCANCODE_PREV_TRACK": SCDef("Prev\nTrack", 0x98, "Prev"),
"SCANCODE_STOP": SCDef("Stop", 0x99, "Stop"),
"SCANCODE_PLAY_PAUSE": SCDef("Play\nPause", 0x9A, "Play"),
"SCANCODE_BRIGHT_INC": SCDef("Bright\nUp", 0x9B, "Brt+"),
"SCANCODE_BRIGHT_DEC": SCDef("Bright\nDown", 0x9C, "Brt-"),
"SCANCODE_MUTE": SCDef("Mute", 0x9D, "Mute"),
"SCANCODE_BASS_BOOST": SCDef("Bass\nBoost", 0x9E, "Bass"),
"SCANCODE_VOL_INC": SCDef("Vol\nUp", 0x9F, "Vol+"),
"SCANCODE_VOL_DEC": SCDef("Vol\nDown", 0xA0, "Vol-"),
"SCANCODE_BASS_INC": SCDef("Bass\nUp", 0xA1, "Bas+"),
"SCANCODE_BASS_DEC": SCDef("Bass\nDown", 0xA2, "Bas-"),
"SCANCODE_TREB_INC": SCDef("Treb\nUp", 0xA3, "Trb+"),
"SCANCODE_TREB_DEC": SCDef("Treb\nDown", 0xA4, "Trb-"),
"SCANCODE_MEDIA_SEL": SCDef("Media\nSelect", 0xA5, "MSel"),
"SCANCODE_MAIL": SCDef("Mail", 0xA6, "Mail"),
"SCANCODE_CALC": SCDef("Calc", 0xA7, "Calc"),
"SCANCODE_MYCOMP": SCDef("My\nComp", 0xA8, "Comp"),
"SCANCODE_SEARCH": SCDef("Search", 0xA9, "Srch"),
"SCANCODE_BROWSER": SCDef("Web\nBrowser", 0xAA, "Web"),
"SCANCODE_BACK": SCDef("Nav\nBack", 0xAB, "Back"),
"SCANCODE_FORWARD": SCDef("Nav\nForward", 0xAC, "Forw"),
"SCANCODE_WWWSTOP": SCDef("Stop\nNav", 0xAD, "Stop"),
"SCANCODE_REFRESH": SCDef("Refresh", 0xAE, "Refr"),
"SCANCODE_FAVES": SCDef("Favorites", 0xAF, "Fav"),
# "": SCDef("", 0xB0, ""),
"SCANCODE_MOUSE1": SCDef("Mouse\nBtn 1", 0xB1, "MB1"),
"SCANCODE_MOUSE2": SCDef("Mouse\nBtn 2", 0xB2, "MB2"),
"SCANCODE_MOUSE3": SCDef("Mouse\nBtn 3", 0xB3, "MB3"),
"SCANCODE_MOUSE4": SCDef("Mouse\nBtn 4", 0xB4, "MB4"),
"SCANCODE_MOUSE5": SCDef("Mouse\nBtn 5", 0xB5, "MB5"),
"SCANCODE_MOUSEXR": SCDef("Mouse\nRight", 0xB6, "Mrt"),
"SCANCODE_MOUSEXL": SCDef("Mouse\nLeft", 0xB7, "Mlf"),
"SCANCODE_MOUSEYU": SCDef("Mouse\nUp", 0xB8, "Mup"),
"SCANCODE_MOUSEYD": SCDef("Mouse\nDown", 0xB9, "Mdn"),
# "": SCDef("", 0xBA, ""),
# "": SCDef("", 0xBB, ""),
# "": SCDef("", 0xBC, ""),
"SCANCODE_POWER": SCDef("Power\n(Win)", 0xBD, "Pwr"),
"SCANCODE_SLEEP": SCDef("Sleep\n(Win)", 0xBE, "Slp"),
"SCANCODE_WAKE": SCDef("Wake\n(Win)", 0xBF, "Wake"),
"SCANCODE_BL_DIMMER": SCDef("BL\nDimmer", 0xC1, "BLdm"),
"SCANCODE_BL_MODE": SCDef("BL\nMode", 0xC2, "BLmd"),
"SCANCODE_BL_ENABLE": SCDef("BL\nEnable", 0xC3, "BLen"),
# "": SCDef("", 0xC4, ""),
# "": SCDef("", 0xC5, ""),
# "": SCDef("", 0xC6, ""),
# "": SCDef("", 0xC7, ""),
"SCANCODE_KEYLOCK": SCDef("KB\nLock", 0xC8, "KbLk"),
"SCANCODE_WINLOCK": SCDef("Win\nLock", 0xC9, "WnLk"),
"SCANCODE_ESCGRAVE": SCDef("~\nEsc", 0xCA, "~Esc"),
# "": SCDef("", 0xCB, ""),
"SCANCODE_MRAM_RECORD": SCDef("Macro\nRec", 0xCC, "Mrec"),
"SCANCODE_MRAM_PLAY": SCDef("Macro\nPlay", 0xCD, "Mply"),
"SCANCODE_BOOT": SCDef("Boot\nMode", 0xCE, "BOOT"),
"SCANCODE_CONFIG": SCDef("Config\nConsole", 0xCF, "Conf"),
"SCANCODE_M1": SCDef("M1", 0xD0, "M1"),
"SCANCODE_M2": SCDef("M2", 0xD1, "M2"),
"SCANCODE_M3": SCDef("M3", 0xD2, "M3"),
"SCANCODE_M4": SCDef("M4", 0xD3, "M4"),
"SCANCODE_M5": SCDef("M5", 0xD4, "M5"),
"SCANCODE_M6": SCDef("M6", 0xD5, "M6"),
"SCANCODE_M7": SCDef("M7", 0xD6, "M7"),
"SCANCODE_M8": SCDef("M8", 0xD7, "M8"),
"SCANCODE_M9": SCDef("M9", 0xD8, "M9"),
"SCANCODE_M10": SCDef("M10", 0xD9, "M10"),
"SCANCODE_M11": SCDef("M11", 0xDA, "M11"),
"SCANCODE_M12": SCDef("M12", 0xDB, "M12"),
"SCANCODE_M13": SCDef("M13", 0xDC, "M13"),
"SCANCODE_M14": SCDef("M14", 0xDD, "M14"),
"SCANCODE_M15": SCDef("M15", 0xDE, "M15"),
"SCANCODE_M16": SCDef("M16", 0xDF, "M16"),
# 0xE_ Range is reserved for modifiers
# 0xF_ Range is reserved for layer select
"SCANCODE_FN0": SCDef("Fn 0", 0xF0, "FN0"),
"SCANCODE_FN": SCDef("Fn 1", 0xF1, "FN1"),
"SCANCODE_FN1": SCDef("Fn 1", 0xF1, "FN1"),
"SCANCODE_FN2": SCDef("Fn 2", 0xF2, "FN2"),
"SCANCODE_FN3": SCDef("Fn 3", 0xF3, "FN3"),
"SCANCODE_FN4": SCDef("Fn 4", 0xF4, "FN4"),
"SCANCODE_FN5": SCDef("Fn 5", 0xF5, "FN5"),
"SCANCODE_FN6": SCDef("Fn 6", 0xF6, "FN6"),
"SCANCODE_FN7": SCDef("Fn 7", 0xF7, "FN7"),
"SCANCODE_FN8": SCDef("Fn 8", 0xF8, "FN8"),
"SCANCODE_FN9": SCDef("Fn 9", 0xF9, "FN9")
}
# Mapping ascii characters to the scancodes that produce them, as well as special names
# from the macro mini-language
CharDef = namedtuple('CharDef', ['scancode', 'needs_shift'])
char_map = {
0: ("0", False),
"MUTE": CharDef("SCANCODE_MUTE", False),
"VOLUP": CharDef("SCANCODE_VOL_INC", False),
"VOLDN": CharDef("SCANCODE_VOL_DEC", False),
"BASS": CharDef("SCANCODE_BASS_BOOST", False),
"NEXT": CharDef("SCANCODE_NEXT_TRACK", False),
"PREV": CharDef("SCANCODE_PREV_TRACK", False),
"STOP": CharDef("SCANCODE_STOP", False),
"PLAY": CharDef("SCANCODE_PLAY_PAUSE", False),
"MAIL": CharDef("SCANCODE_MAIL", False),
"CALC": CharDef("SCANCODE_CALC", False),
"MYCOMP": CharDef("SCANCODE_MYCOMP", False),
"SEARCH": CharDef("SCANCODE_SEARCH", False),
"BROWSER": CharDef("SCANCODE_BROWSER", False),
"BACK": CharDef("SCANCODE_BACK", False),
"FORWARD": CharDef("SCANCODE_FORWARD", False),
"WWWSTOP": CharDef("SCANCODE_WWWSTOP", False),
"REFRESH": CharDef("SCANCODE_REFRESH", False),
"FAVES": CharDef("SCANCODE_FAVES", False),
"ESC": CharDef("HID_KEYBOARD_SC_ESCAPE", False),
"F1": CharDef("HID_KEYBOARD_SC_F1", False),
"F2": CharDef("HID_KEYBOARD_SC_F2", False),
"F3": CharDef("HID_KEYBOARD_SC_F3", False),
"F4": CharDef("HID_KEYBOARD_SC_F4", False),
"F5": CharDef("HID_KEYBOARD_SC_F5", False),
"F6": CharDef("HID_KEYBOARD_SC_F6", False),
"F7": CharDef("HID_KEYBOARD_SC_F7", False),
"F8": CharDef("HID_KEYBOARD_SC_F8", False),
"F9": CharDef("HID_KEYBOARD_SC_F9", False),
"F10": CharDef("HID_KEYBOARD_SC_F10", False),
"F11": CharDef("HID_KEYBOARD_SC_F11", False),
"F12": CharDef("HID_KEYBOARD_SC_F12", False),
"F13": CharDef("HID_KEYBOARD_SC_F13", False),
"F14": CharDef("HID_KEYBOARD_SC_F14", False),
"F15": CharDef("HID_KEYBOARD_SC_F15", False),
"F16": CharDef("HID_KEYBOARD_SC_F16", False),
"F17": CharDef("HID_KEYBOARD_SC_F17", False),
"F18": CharDef("HID_KEYBOARD_SC_F18", False),
"F19": CharDef("HID_KEYBOARD_SC_F19", False),
"F20": CharDef("HID_KEYBOARD_SC_F20", False),
"F21": CharDef("HID_KEYBOARD_SC_F21", False),
"F22": CharDef("HID_KEYBOARD_SC_F22", False),
"F23": CharDef("HID_KEYBOARD_SC_F23", False),
"F24": CharDef("HID_KEYBOARD_SC_F24", False),
"PRINT": CharDef("HID_KEYBOARD_SC_PRINT_SCREEN", False),
"SCRLK": CharDef("HID_KEYBOARD_SC_SCROLL_LOCK", False),
"PAUSE": CharDef("HID_KEYBOARD_SC_PAUSE", False),
"KPSLA": CharDef("HID_KEYBOARD_SC_KEYPAD_SLASH", False),
"KPAST": CharDef("HID_KEYBOARD_SC_KEYPAD_ASTERISK", False),
"KPMIN": CharDef("HID_KEYBOARD_SC_KEYPAD_MINUS", False),
"KPPLS": CharDef("HID_KEYBOARD_SC_KEYPAD_PLUS", False),
"KPENT": CharDef("HID_KEYBOARD_SC_KEYPAD_ENTER", False),
"KP1": CharDef("HID_KEYBOARD_SC_KEYPAD_1_AND_END", False),
"KP2": CharDef("HID_KEYBOARD_SC_KEYPAD_2_AND_DOWN_ARROW", False),
"KP3": CharDef("HID_KEYBOARD_SC_KEYPAD_3_AND_PAGE_DOWN", False),
"KP4": CharDef("HID_KEYBOARD_SC_KEYPAD_4_AND_LEFT_ARROW", False),
"KP5": CharDef("HID_KEYBOARD_SC_KEYPAD_5", False),
"KP6": CharDef("HID_KEYBOARD_SC_KEYPAD_6_AND_RIGHT_ARROW", False),
"KP7": CharDef("HID_KEYBOARD_SC_KEYPAD_7_AND_HOME", False),
"KP8": CharDef("HID_KEYBOARD_SC_KEYPAD_8_AND_UP_ARROW", False),
"KP9": CharDef("HID_KEYBOARD_SC_KEYPAD_9_AND_PAGE_UP", False),
"KP0": CharDef("HID_KEYBOARD_SC_KEYPAD_0_AND_INSERT", False),
"KPDOT": CharDef("HID_KEYBOARD_SC_KEYPAD_DOT_AND_DELETE", False),
"KPEQ": CharDef("HID_KEYBOARD_SC_KEYPAD_EQUAL_SIGN", False),
"`": CharDef("HID_KEYBOARD_SC_GRAVE_ACCENT_AND_TILDE", False),
"1": CharDef("HID_KEYBOARD_SC_1_AND_EXCLAMATION", False),
"2": CharDef("HID_KEYBOARD_SC_2_AND_AT", False),
"3": CharDef("HID_KEYBOARD_SC_3_AND_HASHMARK", False),
"4": CharDef("HID_KEYBOARD_SC_4_AND_DOLLAR", False),
"5": CharDef("HID_KEYBOARD_SC_5_AND_PERCENTAGE", False),
"6": CharDef("HID_KEYBOARD_SC_6_AND_CARET", False),
"7": CharDef("HID_KEYBOARD_SC_7_AND_AND_AMPERSAND", False),
"8": CharDef("HID_KEYBOARD_SC_8_AND_ASTERISK", False),
"9": CharDef("HID_KEYBOARD_SC_9_AND_OPENING_PARENTHESIS", False),
"0": CharDef("HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS", False),
"-": CharDef("HID_KEYBOARD_SC_MINUS_AND_UNDERSCORE", False),
"=": CharDef("HID_KEYBOARD_SC_EQUAL_AND_PLUS", False),
"~": CharDef("HID_KEYBOARD_SC_GRAVE_ACCENT_AND_TILDE", True),
"!": CharDef("HID_KEYBOARD_SC_1_AND_EXCLAMATION", True),
"@": CharDef("HID_KEYBOARD_SC_2_AND_AT", True),
"#": CharDef("HID_KEYBOARD_SC_3_AND_HASHMARK", True),
"$": CharDef("HID_KEYBOARD_SC_4_AND_DOLLAR", True),
"%": CharDef("HID_KEYBOARD_SC_5_AND_PERCENTAGE", True),
"^": CharDef("HID_KEYBOARD_SC_6_AND_CARET", True),
"&": CharDef("HID_KEYBOARD_SC_7_AND_AND_AMPERSAND", True),
"*": CharDef("HID_KEYBOARD_SC_8_AND_ASTERISK", True),
"(": CharDef("HID_KEYBOARD_SC_9_AND_OPENING_PARENTHESIS", True),
")": CharDef("HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS", True),
"_": CharDef("HID_KEYBOARD_SC_MINUS_AND_UNDERSCORE", True),
"+": CharDef("HID_KEYBOARD_SC_EQUAL_AND_PLUS", True),
"BKSP": CharDef("HID_KEYBOARD_SC_BACKSPACE", False),
"INS": CharDef("HID_KEYBOARD_SC_INSERT", False),
"HOME": CharDef("HID_KEYBOARD_SC_HOME", False),
"PGUP": CharDef("HID_KEYBOARD_SC_PAGE_UP", False),
"TAB": CharDef("HID_KEYBOARD_SC_TAB", False),
"\t": CharDef("HID_KEYBOARD_SC_TAB", False),
"q": CharDef("HID_KEYBOARD_SC_Q", False),
"w": CharDef("HID_KEYBOARD_SC_W", False),
"e": CharDef("HID_KEYBOARD_SC_E", False),
"r": CharDef("HID_KEYBOARD_SC_R", False),
"t": CharDef("HID_KEYBOARD_SC_T", False),
"y": CharDef("HID_KEYBOARD_SC_Y", False),
"u": CharDef("HID_KEYBOARD_SC_U", False),
"i": CharDef("HID_KEYBOARD_SC_I", False),
"o": CharDef("HID_KEYBOARD_SC_O", False),
"p": CharDef("HID_KEYBOARD_SC_P", False),
"[": CharDef("HID_KEYBOARD_SC_OPENING_BRACKET_AND_OPENING_BRACE", False),
"]": CharDef("HID_KEYBOARD_SC_CLOSING_BRACKET_AND_CLOSING_BRACE", False),
"\\": CharDef("HID_KEYBOARD_SC_BACKSLASH_AND_PIPE", False),
"Q": CharDef("HID_KEYBOARD_SC_Q", True),
"W": CharDef("HID_KEYBOARD_SC_W", True),
"E": CharDef("HID_KEYBOARD_SC_E", True),
"R": CharDef("HID_KEYBOARD_SC_R", True),
"T": CharDef("HID_KEYBOARD_SC_T", True),
"Y": CharDef("HID_KEYBOARD_SC_Y", True),
"U": CharDef("HID_KEYBOARD_SC_U", True),
"I": CharDef("HID_KEYBOARD_SC_I", True),
"O": CharDef("HID_KEYBOARD_SC_O", True),
"P": CharDef("HID_KEYBOARD_SC_P", True),
"{": CharDef("HID_KEYBOARD_SC_OPENING_BRACKET_AND_OPENING_BRACE", True),
"}": CharDef("HID_KEYBOARD_SC_CLOSING_BRACKET_AND_CLOSING_BRACE", True),
"|": CharDef("HID_KEYBOARD_SC_BACKSLASH_AND_PIPE", True),
"DEL": CharDef("HID_KEYBOARD_SC_DELETE", False),
"END": CharDef("HID_KEYBOARD_SC_END", False),
"PGDN": CharDef("HID_KEYBOARD_SC_PAGE_DOWN", False),
"CAPSLK": CharDef("HID_KEYBOARD_SC_CAPS_LOCK", False),
"a": CharDef("HID_KEYBOARD_SC_A", False),
"s": CharDef("HID_KEYBOARD_SC_S", False),
"d": CharDef("HID_KEYBOARD_SC_D", False),
"f": CharDef("HID_KEYBOARD_SC_F", False),
"g": CharDef("HID_KEYBOARD_SC_G", False),
"h": CharDef("HID_KEYBOARD_SC_H", False),
"j": CharDef("HID_KEYBOARD_SC_J", False),
"k": CharDef("HID_KEYBOARD_SC_K", False),
"l": CharDef("HID_KEYBOARD_SC_L", False),
";": CharDef("HID_KEYBOARD_SC_SEMICOLON_AND_COLON", False),
"'": CharDef("HID_KEYBOARD_SC_APOSTROPHE_AND_QUOTE", False),
"A": CharDef("HID_KEYBOARD_SC_A", True),
"S": CharDef("HID_KEYBOARD_SC_S", True),
"D": CharDef("HID_KEYBOARD_SC_D", True),
"F": CharDef("HID_KEYBOARD_SC_F", True),
"G": CharDef("HID_KEYBOARD_SC_G", True),
"H": CharDef("HID_KEYBOARD_SC_H", True),
"J": CharDef("HID_KEYBOARD_SC_J", True),
"K": CharDef("HID_KEYBOARD_SC_K", True),
"L": CharDef("HID_KEYBOARD_SC_L", True),
":": CharDef("HID_KEYBOARD_SC_SEMICOLON_AND_COLON", True),
"\"": CharDef("HID_KEYBOARD_SC_APOSTROPHE_AND_QUOTE", True),
"ENTER": CharDef("HID_KEYBOARD_SC_ENTER", False),
"\n": CharDef("HID_KEYBOARD_SC_ENTER", False),
"\r": CharDef("HID_KEYBOARD_SC_ENTER", False),
"z": CharDef("HID_KEYBOARD_SC_Z", False),
"x": CharDef("HID_KEYBOARD_SC_X", False),
"c": CharDef("HID_KEYBOARD_SC_C", False),
"v": CharDef("HID_KEYBOARD_SC_V", False),
"b": CharDef("HID_KEYBOARD_SC_B", False),
"n": CharDef("HID_KEYBOARD_SC_N", False),
"m": CharDef("HID_KEYBOARD_SC_M", False),
",": CharDef("HID_KEYBOARD_SC_COMMA_AND_LESS_THAN_SIGN", False),
".": CharDef("HID_KEYBOARD_SC_DOT_AND_GREATER_THAN_SIGN", False),
"/": CharDef("HID_KEYBOARD_SC_SLASH_AND_QUESTION_MARK", False),
"Z": CharDef("HID_KEYBOARD_SC_Z", True),
"X": CharDef("HID_KEYBOARD_SC_X", True),
"C": CharDef("HID_KEYBOARD_SC_C", True),
"V": CharDef("HID_KEYBOARD_SC_V", True),
"B": CharDef("HID_KEYBOARD_SC_B", True),
"N": CharDef("HID_KEYBOARD_SC_N", True),
"M": CharDef("HID_KEYBOARD_SC_M", True),
"<": CharDef("HID_KEYBOARD_SC_COMMA_AND_LESS_THAN_SIGN", True),
">": CharDef("HID_KEYBOARD_SC_DOT_AND_GREATER_THAN_SIGN", True),
"?": CharDef("HID_KEYBOARD_SC_SLASH_AND_QUESTION_MARK", True),
"UP": CharDef("HID_KEYBOARD_SC_UP_ARROW", False),
"LEFT": CharDef("HID_KEYBOARD_SC_LEFT_ARROW", False),
"DOWN": CharDef("HID_KEYBOARD_SC_DOWN_ARROW", False),
"RIGHT": CharDef("HID_KEYBOARD_SC_RIGHT_ARROW", False),
"SPACE": CharDef("HID_KEYBOARD_SC_SPACE", False),
" ": CharDef("HID_KEYBOARD_SC_SPACE", False),
"APP": CharDef("HID_KEYBOARD_SC_APPLICATION", False),
"NON_US_BACKSLASH": CharDef("HID_KEYBOARD_SC_NON_US_BACKSLASH_AND_PIPE", False)
}
# Mapping wx keycodes to scancodes, not including things we have no scancode for,
# nor Esc, Tab, Space, and arrows, which are used by the property editor for navigation.
keycode_map = {
wx.WXK_BACK: 'HID_KEYBOARD_SC_BACKSPACE',
# wx.WXK_TAB: 'HID_KEYBOARD_SC_TAB',
wx.WXK_RETURN: 'HID_KEYBOARD_SC_ENTER',
# wx.WXK_ESCAPE: 'HID_KEYBOARD_SC_ESCAPE',
# wx.WXK_SPACE: 'HID_KEYBOARD_SC_SPACE',
wx.WXK_DELETE: 'HID_KEYBOARD_SC_DELETE',
# wx.WXK_LBUTTON: '',
# wx.WXK_RBUTTON: '',
# wx.WXK_CANCEL: '',
# wx.WXK_MBUTTON: '',
wx.WXK_CLEAR: 'HID_KEYBOARD_SC_KEYPAD_5',
wx.WXK_SHIFT: 'HID_KEYBOARD_SC_LEFT_SHIFT',
wx.WXK_ALT: 'HID_KEYBOARD_SC_LEFT_ALT',
wx.WXK_CONTROL: 'HID_KEYBOARD_SC_LEFT_CONTROL',
wx.WXK_RAW_CONTROL: 'HID_KEYBOARD_SC_LEFT_CONTROL',
# wx.WXK_MENU: '',
wx.WXK_PAUSE: 'HID_KEYBOARD_SC_PAUSE',
wx.WXK_CAPITAL: 'HID_KEYBOARD_SC_CAPS_LOCK',
wx.WXK_END: 'HID_KEYBOARD_SC_END',
wx.WXK_HOME: 'HID_KEYBOARD_SC_HOME',
# wx.WXK_LEFT: 'HID_KEYBOARD_SC_LEFT_ARROW',
# wx.WXK_UP: 'HID_KEYBOARD_SC_UP_ARROW',
# wx.WXK_RIGHT: 'HID_KEYBOARD_SC_RIGHT_ARROW',
# wx.WXK_DOWN: 'HID_KEYBOARD_SC_DOWN_ARROW',
# wx.WXK_SELECT: '',
# wx.WXK_PRINT: '',
# wx.WXK_EXECUTE: '',
# wx.WXK_SNAPSHOT: '',
wx.WXK_INSERT: 'HID_KEYBOARD_SC_INSERT',
# wx.WXK_HELP: '',
wx.WXK_NUMPAD0: 'HID_KEYBOARD_SC_KEYPAD_0_AND_INSERT',
wx.WXK_NUMPAD1: 'HID_KEYBOARD_SC_KEYPAD_1_AND_END',
wx.WXK_NUMPAD2: 'HID_KEYBOARD_SC_KEYPAD_2_AND_DOWN_ARROW',
wx.WXK_NUMPAD3: 'HID_KEYBOARD_SC_KEYPAD_3_AND_PAGE_DOWN',
wx.WXK_NUMPAD4: 'HID_KEYBOARD_SC_KEYPAD_4_AND_LEFT_ARROW',
wx.WXK_NUMPAD5: 'HID_KEYBOARD_SC_KEYPAD_5',
wx.WXK_NUMPAD6: 'HID_KEYBOARD_SC_KEYPAD_6_AND_RIGHT_ARROW',
wx.WXK_NUMPAD7: 'HID_KEYBOARD_SC_KEYPAD_7_AND_HOME',
wx.WXK_NUMPAD8: 'HID_KEYBOARD_SC_KEYPAD_8_AND_UP_ARROW',
wx.WXK_NUMPAD9: 'HID_KEYBOARD_SC_KEYPAD_9_AND_PAGE_UP',
# wx.WXK_MULTIPLY: '',
# wx.WXK_ADD: '',
# wx.WXK_SEPARATOR: '',
# wx.WXK_SUBTRACT: '',
# wx.WXK_DECIMAL: '',
# wx.WXK_DIVIDE: '',
wx.WXK_F1: 'HID_KEYBOARD_SC_F1',
wx.WXK_F2: 'HID_KEYBOARD_SC_F2',
wx.WXK_F3: 'HID_KEYBOARD_SC_F3',
wx.WXK_F4: 'HID_KEYBOARD_SC_F4',
wx.WXK_F5: 'HID_KEYBOARD_SC_F5',
wx.WXK_F6: 'HID_KEYBOARD_SC_F6',
wx.WXK_F7: 'HID_KEYBOARD_SC_F7',
wx.WXK_F8: 'HID_KEYBOARD_SC_F8',
wx.WXK_F9: 'HID_KEYBOARD_SC_F9',
wx.WXK_F10: 'HID_KEYBOARD_SC_F10',
wx.WXK_F11: 'HID_KEYBOARD_SC_F11',
wx.WXK_F12: 'HID_KEYBOARD_SC_F12',
wx.WXK_F13: 'HID_KEYBOARD_SC_F13',
wx.WXK_F14: 'HID_KEYBOARD_SC_F14',
wx.WXK_F15: 'HID_KEYBOARD_SC_F15',
wx.WXK_F16: 'HID_KEYBOARD_SC_F16',
wx.WXK_F17: 'HID_KEYBOARD_SC_F17',
wx.WXK_F18: 'HID_KEYBOARD_SC_F18',
wx.WXK_F19: 'HID_KEYBOARD_SC_F19',
wx.WXK_F20: 'HID_KEYBOARD_SC_F20',
wx.WXK_F21: 'HID_KEYBOARD_SC_F21',
wx.WXK_F22: 'HID_KEYBOARD_SC_F22',
wx.WXK_F23: 'HID_KEYBOARD_SC_F23',
wx.WXK_F24: 'HID_KEYBOARD_SC_F24',
wx.WXK_NUMLOCK: 'HID_KEYBOARD_SC_NUM_LOCK',
wx.WXK_SCROLL: 'HID_KEYBOARD_SC_SCROLL_LOCK',
wx.WXK_PAGEUP: 'HID_KEYBOARD_SC_PAGE_UP',
wx.WXK_PAGEDOWN: 'HID_KEYBOARD_SC_PAGE_DOWN',
# wx.WXK_NUMPAD_SPACE: '',
# wx.WXK_NUMPAD_TAB: '',
wx.WXK_NUMPAD_ENTER: 'HID_KEYBOARD_SC_KEYPAD_ENTER',
# wx.WXK_NUMPAD_F1: '',
# wx.WXK_NUMPAD_F2: '',
# wx.WXK_NUMPAD_F3: '',
# wx.WXK_NUMPAD_F4: '',
wx.WXK_NUMPAD_HOME: 'HID_KEYBOARD_SC_KEYPAD_7_AND_HOME',
wx.WXK_NUMPAD_LEFT: 'HID_KEYBOARD_SC_KEYPAD_4_AND_LEFT_ARROW',
wx.WXK_NUMPAD_UP: 'HID_KEYBOARD_SC_KEYPAD_8_AND_UP_ARROW',
wx.WXK_NUMPAD_RIGHT: 'HID_KEYBOARD_SC_KEYPAD_6_AND_RIGHT_ARROW',
wx.WXK_NUMPAD_DOWN: 'HID_KEYBOARD_SC_KEYPAD_2_AND_DOWN_ARROW',
wx.WXK_NUMPAD_PAGEUP: 'HID_KEYBOARD_SC_KEYPAD_9_AND_PAGE_UP',
wx.WXK_NUMPAD_PAGEDOWN: 'HID_KEYBOARD_SC_KEYPAD_3_AND_PAGE_DOWN',
wx.WXK_NUMPAD_END: 'HID_KEYBOARD_SC_KEYPAD_1_AND_END',
wx.WXK_NUMPAD_BEGIN: 'HID_KEYBOARD_SC_KEYPAD_7_AND_HOME',
wx.WXK_NUMPAD_INSERT: 'HID_KEYBOARD_SC_KEYPAD_0_AND_INSERT',
wx.WXK_NUMPAD_DELETE: 'HID_KEYBOARD_SC_KEYPAD_DOT_AND_DELETE',
wx.WXK_NUMPAD_EQUAL: 'HID_KEYBOARD_SC_KEYPAD_EQUAL_SIGN',
wx.WXK_NUMPAD_MULTIPLY: 'HID_KEYBOARD_SC_KEYPAD_ASTERISK',
wx.WXK_NUMPAD_ADD: 'HID_KEYBOARD_SC_KEYPAD_PLUS',
# wx.WXK_NUMPAD_SEPARATOR: '',
wx.WXK_NUMPAD_SUBTRACT: 'HID_KEYBOARD_SC_KEYPAD_MINUS',
wx.WXK_NUMPAD_DECIMAL: 'HID_KEYBOARD_SC_KEYPAD_DOT_AND_DELETE',
wx.WXK_NUMPAD_DIVIDE: 'HID_KEYBOARD_SC_KEYPAD_SLASH',
wx.WXK_WINDOWS_LEFT: 'HID_KEYBOARD_SC_LEFT_GUI',
wx.WXK_WINDOWS_RIGHT: 'HID_KEYBOARD_SC_RIGHT_GUI',
wx.WXK_WINDOWS_MENU: 'HID_KEYBOARD_SC_APPLICATION',
}
You can’t perform that action at this time.