summaryrefslogtreecommitdiff
path: root/keys.ha
diff options
context:
space:
mode:
authorLassi Pulkkinen <lassi@pulk.fi>2024-10-31 03:11:21 +0200
committerLassi Pulkkinen <lassi@pulk.fi>2024-10-31 03:51:35 +0200
commitae44478b30d890fe0fb04022f44d474dcdcc3f9d (patch)
tree5f462459ae4b47d22114eed717d1382d08cf4dfe /keys.ha
Initial commit (import old repo)HEADmain
Diffstat (limited to 'keys.ha')
-rw-r--r--keys.ha214
1 files changed, 214 insertions, 0 deletions
diff --git a/keys.ha b/keys.ha
new file mode 100644
index 0000000..c536251
--- /dev/null
+++ b/keys.ha
@@ -0,0 +1,214 @@
+// Key codes as defined by the USB HID Usage Tables 1.4 specification,
+// located at <https://usb.org/sites/default/files/hut1_4.pdf>.
+
+def KEY_A = 0x04: Key;
+def KEY_B = 0x05: Key;
+def KEY_C = 0x06: Key;
+def KEY_D = 0x07: Key;
+def KEY_E = 0x08: Key;
+def KEY_F = 0x09: Key;
+def KEY_G = 0x0a: Key;
+def KEY_H = 0x0b: Key;
+def KEY_I = 0x0c: Key;
+def KEY_J = 0x0d: Key;
+def KEY_K = 0x0e: Key;
+def KEY_L = 0x0f: Key;
+def KEY_M = 0x10: Key;
+def KEY_N = 0x11: Key;
+def KEY_O = 0x12: Key;
+def KEY_P = 0x13: Key;
+def KEY_Q = 0x14: Key;
+def KEY_R = 0x15: Key;
+def KEY_S = 0x16: Key;
+def KEY_T = 0x17: Key;
+def KEY_U = 0x18: Key;
+def KEY_V = 0x19: Key;
+def KEY_W = 0x1a: Key;
+def KEY_X = 0x1b: Key;
+def KEY_Y = 0x1c: Key;
+def KEY_Z = 0x1d: Key;
+def KEY_1 = 0x1e: Key;
+def KEY_2 = 0x1f: Key;
+def KEY_3 = 0x20: Key;
+def KEY_4 = 0x21: Key;
+def KEY_5 = 0x22: Key;
+def KEY_6 = 0x23: Key;
+def KEY_7 = 0x24: Key;
+def KEY_8 = 0x25: Key;
+def KEY_9 = 0x26: Key;
+def KEY_0 = 0x27: Key;
+def KEY_RETURN_ENTER = 0x28: Key;
+def KEY_ESCAPE = 0x29: Key;
+def KEY_BACKSPACE = 0x2a: Key;
+def KEY_TAB = 0x2b: Key;
+def KEY_SPACE = 0x2c: Key;
+def KEY_HYPHEN = 0x2d: Key;
+def KEY_EQUALS = 0x2e: Key;
+def KEY_LBRACKET = 0x2f: Key;
+def KEY_RBRACKET = 0x30: Key;
+def KEY_BACKSLASH = 0x31: Key;
+def KEY_NON_US_HASH = 0x32: Key;
+def KEY_SEMICOLON = 0x33: Key;
+def KEY_APOSTROPHE = 0x34: Key;
+def KEY_GRAVE = 0x35: Key;
+def KEY_COMMA = 0x36: Key;
+def KEY_PERIOD = 0x37: Key;
+def KEY_SLASH = 0x38: Key;
+def KEY_CAPS_LOCK = 0x39: Key;
+def KEY_F1 = 0x3a: Key;
+def KEY_F2 = 0x3b: Key;
+def KEY_F3 = 0x3c: Key;
+def KEY_F4 = 0x3d: Key;
+def KEY_F5 = 0x3e: Key;
+def KEY_F6 = 0x3f: Key;
+def KEY_F7 = 0x40: Key;
+def KEY_F8 = 0x41: Key;
+def KEY_F9 = 0x42: Key;
+def KEY_F10 = 0x43: Key;
+def KEY_F11 = 0x44: Key;
+def KEY_F12 = 0x45: Key;
+def KEY_PRINT_SCREEN = 0x46: Key;
+def KEY_SCROLL_LOCK = 0x47: Key;
+def KEY_PAUSE = 0x48: Key;
+def KEY_INSERT = 0x49: Key;
+def KEY_HOME = 0x4a: Key;
+def KEY_PAGE_UP = 0x4b: Key;
+def KEY_DELETE = 0x4c: Key;
+def KEY_END = 0x4d: Key;
+def KEY_PAGE_DOWN = 0x4e: Key;
+def KEY_RIGHT = 0x4f: Key;
+def KEY_LEFT = 0x50: Key;
+def KEY_DOWN = 0x51: Key;
+def KEY_UP = 0x52: Key;
+def KEY_NUM_LOCK = 0x53: Key;
+def KEY_PAD_DIVIDE = 0x54: Key;
+def KEY_PAD_MULTIPLY = 0x55: Key;
+def KEY_PAD_MINUS = 0x56: Key;
+def KEY_PAD_PLUS = 0x57: Key;
+def KEY_PAD_ENTER = 0x58: Key;
+def KEY_PAD_1 = 0x59: Key;
+def KEY_PAD_2 = 0x5a: Key;
+def KEY_PAD_3 = 0x5b: Key;
+def KEY_PAD_4 = 0x5c: Key;
+def KEY_PAD_5 = 0x5d: Key;
+def KEY_PAD_6 = 0x5e: Key;
+def KEY_PAD_7 = 0x5f: Key;
+def KEY_PAD_8 = 0x60: Key;
+def KEY_PAD_9 = 0x61: Key;
+def KEY_PAD_0 = 0x62: Key;
+def KEY_PAD_PERIOD = 0x63: Key;
+def KEY_NON_US_BACKSLASH = 0x64: Key;
+def KEY_APPLICATION = 0x65: Key;
+def KEY_PAD_EQUALS = 0x67: Key;
+def KEY_F13 = 0x68: Key;
+def KEY_F14 = 0x69: Key;
+def KEY_F15 = 0x6a: Key;
+def KEY_F16 = 0x6b: Key;
+def KEY_F17 = 0x6c: Key;
+def KEY_F18 = 0x6d: Key;
+def KEY_F19 = 0x6e: Key;
+def KEY_F20 = 0x6f: Key;
+def KEY_F21 = 0x70: Key;
+def KEY_F22 = 0x71: Key;
+def KEY_F23 = 0x72: Key;
+def KEY_F24 = 0x73: Key;
+def KEY_EXECUTE = 0x74: Key;
+def KEY_HELP = 0x75: Key;
+def KEY_MENU = 0x76: Key;
+def KEY_SELECT = 0x77: Key;
+def KEY_STOP = 0x78: Key;
+def KEY_AGAIN = 0x79: Key;
+def KEY_UNDO = 0x7a: Key;
+def KEY_CUT = 0x7b: Key;
+def KEY_COPY = 0x7c: Key;
+def KEY_PASTE = 0x7d: Key;
+def KEY_FIND = 0x7e: Key;
+def KEY_MUTE = 0x7f: Key;
+def KEY_VOLUME_UP = 0x80: Key;
+def KEY_VOLUME_DOWN = 0x81: Key;
+def KEY_PAD_COMMA = 0x85: Key;
+def KEY_PAD_EQUAL_SIGN = 0x86: Key;
+def KEY_INTERNATIONAL1 = 0x87: Key;
+def KEY_INTERNATIONAL2 = 0x88: Key;
+def KEY_INTERNATIONAL3 = 0x89: Key;
+def KEY_INTERNATIONAL4 = 0x8a: Key;
+def KEY_INTERNATIONAL5 = 0x8b: Key;
+def KEY_INTERNATIONAL6 = 0x8c: Key;
+def KEY_INTERNATIONAL7 = 0x8d: Key;
+def KEY_INTERNATIONAL8 = 0x8e: Key;
+def KEY_INTERNATIONAL9 = 0x8f: Key;
+def KEY_LANG1 = 0x90: Key;
+def KEY_LANG2 = 0x91: Key;
+def KEY_LANG3 = 0x92: Key;
+def KEY_LANG4 = 0x93: Key;
+def KEY_LANG5 = 0x94: Key;
+def KEY_LANG6 = 0x95: Key;
+def KEY_LANG7 = 0x96: Key;
+def KEY_LANG8 = 0x97: Key;
+def KEY_LANG9 = 0x98: Key;
+def KEY_ALT_ERASE = 0x99: Key;
+def KEY_SYSREQ = 0x9a: Key;
+def KEY_CANCEL = 0x9b: Key;
+def KEY_CLEAR = 0x9c: Key;
+def KEY_PRIOR = 0x9d: Key;
+def KEY_RETURN = 0x9e: Key;
+def KEY_SEPARATOR = 0x9f: Key;
+def KEY_OUT = 0xa0: Key;
+def KEY_OPER = 0xa1: Key;
+def KEY_CLEAR_AGAIN = 0xa2: Key;
+def KEY_CRSEL = 0xa3: Key;
+def KEY_EXSEL = 0xa4: Key;
+def KEY_PAD_00 = 0xb0: Key;
+def KEY_PAD_000 = 0xb1: Key;
+def KEY_THOUSANDS_SEPARATOR = 0xb2: Key;
+def KEY_DECIMAL_SEPARATOR = 0xb3: Key;
+def KEY_CURRENCY_UNIT = 0xb4: Key;
+def KEY_CURRENCY_SUB_UNIT = 0xb5: Key;
+def KEY_PAD_LPAREN = 0xb6: Key;
+def KEY_PAD_RPAREN = 0xb7: Key;
+def KEY_PAD_LBRACE = 0xb8: Key;
+def KEY_PAD_RBRACE = 0xb9: Key;
+def KEY_PAD_TAB = 0xba: Key;
+def KEY_PAD_BACKSPACE = 0xbb: Key;
+def KEY_PAD_A = 0xbc: Key;
+def KEY_PAD_B = 0xbd: Key;
+def KEY_PAD_C = 0xbe: Key;
+def KEY_PAD_D = 0xbf: Key;
+def KEY_PAD_E = 0xc0: Key;
+def KEY_PAD_F = 0xc1: Key;
+def KEY_PAD_XOR = 0xc2: Key;
+def KEY_PAD_POWER = 0xc3: Key;
+def KEY_PAD_PERCENT = 0xc4: Key;
+def KEY_PAD_LESS = 0xc5: Key;
+def KEY_PAD_GREATER = 0xc6: Key;
+def KEY_PAD_AND = 0xc7: Key;
+def KEY_PAD_ANDAND = 0xc8: Key;
+def KEY_PAD_OR = 0xc9: Key;
+def KEY_PAD_OROR = 0xca: Key;
+def KEY_PAD_COLON = 0xcb: Key;
+def KEY_PAD_HASH = 0xcc: Key;
+def KEY_PAD_SPACE = 0xcd: Key;
+def KEY_PAD_AT = 0xce: Key;
+def KEY_PAD_EXCLAMATION = 0xcf: Key;
+def KEY_PAD_MEMORY_STORE = 0xd0: Key;
+def KEY_PAD_MEMORY_RECALL = 0xd1: Key;
+def KEY_PAD_MEMORY_CLEAR = 0xd2: Key;
+def KEY_PAD_MEMORY_ADD = 0xd3: Key;
+def KEY_PAD_MEMORY_SUBTRACT = 0xd4: Key;
+def KEY_PAD_MEMORY_MULTIPLY = 0xd5: Key;
+def KEY_PAD_MEMORY_DIVIDE = 0xd6: Key;
+def KEY_PAD_PLUS_MINUS = 0xd7: Key;
+def KEY_PAD_CLEAR = 0xd8: Key;
+def KEY_PAD_CLEAR_ENTRY = 0xd9: Key;
+def KEY_PAD_BINARY = 0xda: Key;
+def KEY_PAD_OCTAL = 0xdb: Key;
+def KEY_PAD_DECIMAL = 0xdc: Key;
+def KEY_PAD_HEXADECIMAL = 0xdd: Key;
+def KEY_LCTRL = 0xe0: Key;
+def KEY_LSHIFT = 0xe1: Key;
+def KEY_LALT = 0xe2: Key;
+def KEY_LGUI = 0xe3: Key;
+def KEY_RCTRL = 0xe4: Key;
+def KEY_RSHIFT = 0xe5: Key;
+def KEY_RALT = 0xe6: Key;
+def KEY_RGUI = 0xe7: Key;