1 /** 2 Copyright: Copyright (c) 2013-2018 Andrey Penechko. 3 License: $(WEB boost.org/LICENSE_1_0.txt, Boost License 1.0). 4 Authors: Andrey Penechko. 5 */ 6 7 module voxelman.platform.input; 8 9 enum KeyModifiers : uint 10 { 11 SHIFT = 1, 12 CONTROL = 2, 13 ALT = 4, 14 SUPER = 8, 15 } 16 17 enum KeyCode : uint 18 { 19 KEY_SPACE = 32, 20 KEY_APOSTROPHE = 39, 21 KEY_COMMA = 44, 22 KEY_MINUS = 45, 23 KEY_PERIOD = 46, 24 KEY_SLASH = 47, 25 KEY_0 = 48, 26 KEY_1 = 49, 27 KEY_2 = 50, 28 KEY_3 = 51, 29 KEY_4 = 52, 30 KEY_5 = 53, 31 KEY_6 = 54, 32 KEY_7 = 55, 33 KEY_8 = 56, 34 KEY_9 = 57, 35 KEY_SEMICOLON = 59, 36 KEY_EQUAL = 61, 37 KEY_A = 65, 38 KEY_B = 66, 39 KEY_C = 67, 40 KEY_D = 68, 41 KEY_E = 69, 42 KEY_F = 70, 43 KEY_G = 71, 44 KEY_H = 72, 45 KEY_I = 73, 46 KEY_J = 74, 47 KEY_K = 75, 48 KEY_L = 76, 49 KEY_M = 77, 50 KEY_N = 78, 51 KEY_O = 79, 52 KEY_P = 80, 53 KEY_Q = 81, 54 KEY_R = 82, 55 KEY_S = 83, 56 KEY_T = 84, 57 KEY_U = 85, 58 KEY_V = 86, 59 KEY_W = 87, 60 KEY_X = 88, 61 KEY_Y = 89, 62 KEY_Z = 90, 63 KEY_LEFT_BRACKET = 91, 64 KEY_BACKSLASH = 92, 65 KEY_RIGHT_BRACKET = 93, 66 KEY_GRAVE_ACCENT = 96, 67 KEY_TILDE = KEY_GRAVE_ACCENT, 68 KEY_WORLD_1 = 161, 69 KEY_WORLD_2 = 162, 70 71 KEY_ESCAPE = 256, 72 KEY_ENTER = 257, 73 KEY_TAB = 258, 74 KEY_BACKSPACE = 259, 75 KEY_INSERT = 260, 76 KEY_DELETE = 261, 77 KEY_RIGHT = 262, 78 KEY_LEFT = 263, 79 KEY_DOWN = 264, 80 KEY_UP = 265, 81 KEY_PAGE_UP = 266, 82 KEY_PAGE_DOWN = 267, 83 KEY_HOME = 268, 84 KEY_END = 269, 85 KEY_CAPS_LOCK = 280, 86 KEY_SCROLL_LOCK = 281, 87 KEY_NUM_LOCK = 282, 88 KEY_PRINT_SCREEN = 283, 89 KEY_PAUSE = 284, 90 KEY_F1 = 290, 91 KEY_F2 = 291, 92 KEY_F3 = 292, 93 KEY_F4 = 293, 94 KEY_F5 = 294, 95 KEY_F6 = 295, 96 KEY_F7 = 296, 97 KEY_F8 = 297, 98 KEY_F9 = 298, 99 KEY_F10 = 299, 100 KEY_F11 = 300, 101 KEY_F12 = 301, 102 KEY_F13 = 302, 103 KEY_F14 = 303, 104 KEY_F15 = 304, 105 KEY_F16 = 305, 106 KEY_F17 = 306, 107 KEY_F18 = 307, 108 KEY_F19 = 308, 109 KEY_F20 = 309, 110 KEY_F21 = 310, 111 KEY_F22 = 311, 112 KEY_F23 = 312, 113 KEY_F24 = 313, 114 KEY_F25 = 314, 115 KEY_KP_0 = 320, 116 KEY_KP_1 = 321, 117 KEY_KP_2 = 322, 118 KEY_KP_3 = 323, 119 KEY_KP_4 = 324, 120 KEY_KP_5 = 325, 121 KEY_KP_6 = 326, 122 KEY_KP_7 = 327, 123 KEY_KP_8 = 328, 124 KEY_KP_9 = 329, 125 KEY_KP_DECIMAL = 330, 126 KEY_KP_DIVIDE = 331, 127 KEY_KP_MULTIPLY = 332, 128 KEY_KP_SUBTRACT = 333, 129 KEY_KP_ADD = 334, 130 KEY_KP_ENTER = 335, 131 KEY_KP_EQUAL = 336, 132 KEY_LEFT_SHIFT = 340, 133 KEY_LEFT_CONTROL = 341, 134 KEY_LEFT_ALT = 342, 135 KEY_LEFT_SUPER = 343, 136 KEY_RIGHT_SHIFT = 344, 137 KEY_RIGHT_CONTROL = 345, 138 KEY_RIGHT_ALT = 346, 139 KEY_RIGHT_SUPER = 347, 140 KEY_MENU = 348, 141 KEY_LAST = KEY_MENU, 142 } 143 144 enum PointerButton : uint 145 { 146 PB_1 = 0, 147 PB_2 = 1, 148 PB_3 = 2, 149 PB_4 = 3, 150 PB_5 = 4, 151 PB_6 = 5, 152 PB_7 = 6, 153 PB_8 = 7, 154 PB_LAST = PB_8, 155 PB_LEFT = PB_1, 156 PB_RIGHT = PB_2, 157 PB_MIDDLE= PB_3, 158 }