1 /* 2 Copyright (c) 2013 Andrey Penechko 3 4 Boost Software License - Version 1.0 - August 17th, 2003 5 6 Permission is hereby granted, free of charge, to any person or organization 7 obtaining a copy of the software and accompanying documentation covered by 8 this license the "Software" to use, reproduce, display, distribute, 9 execute, and transmit the Software, and to prepare derivative works of the 10 Software, and to permit third-parties to whom the Software is furnished to 11 do so, all subject to the following: 12 13 The copyright notices in the Software and this entire statement, including 14 the above license grant, this restriction and the following disclaimer, 15 must be included in all copies of the Software, in whole or in part, and 16 all derivative works of the Software, unless such copies or derivative 17 works are solely in the form of machine-executable object code generated by 18 a source language processor. 19 20 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 23 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 24 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 25 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 DEALINGS IN THE SOFTWARE. 27 */ 28 29 module anchovy.core.input; 30 31 enum KeyModifiers : uint 32 { 33 SHIFT = 1, 34 CONTROL = 2, 35 ALT = 4, 36 SUPER = 8, 37 } 38 39 enum KeyCode : uint 40 { 41 KEY_SPACE = 32, 42 KEY_APOSTROPHE = 39, 43 KEY_COMMA = 44, 44 KEY_MINUS = 45, 45 KEY_PERIOD = 46, 46 KEY_SLASH = 47, 47 KEY_0 = 48, 48 KEY_1 = 49, 49 KEY_2 = 50, 50 KEY_3 = 51, 51 KEY_4 = 52, 52 KEY_5 = 53, 53 KEY_6 = 54, 54 KEY_7 = 55, 55 KEY_8 = 56, 56 KEY_9 = 57, 57 KEY_SEMICOLON = 59, 58 KEY_EQUAL = 61, 59 KEY_A = 65, 60 KEY_B = 66, 61 KEY_C = 67, 62 KEY_D = 68, 63 KEY_E = 69, 64 KEY_F = 70, 65 KEY_G = 71, 66 KEY_H = 72, 67 KEY_I = 73, 68 KEY_J = 74, 69 KEY_K = 75, 70 KEY_L = 76, 71 KEY_M = 77, 72 KEY_N = 78, 73 KEY_O = 79, 74 KEY_P = 80, 75 KEY_Q = 81, 76 KEY_R = 82, 77 KEY_S = 83, 78 KEY_T = 84, 79 KEY_U = 85, 80 KEY_V = 86, 81 KEY_W = 87, 82 KEY_X = 88, 83 KEY_Y = 89, 84 KEY_Z = 90, 85 KEY_LEFT_BRACKET = 91, 86 KEY_BACKSLASH = 92, 87 KEY_RIGHT_BRACKET = 93, 88 KEY_GRAVE_ACCENT = 96, 89 KEY_WORLD_1 = 161, 90 KEY_WORLD_2 = 162, 91 92 KEY_ESCAPE = 256, 93 KEY_ENTER = 257, 94 KEY_TAB = 258, 95 KEY_BACKSPACE = 259, 96 KEY_INSERT = 260, 97 KEY_DELETE = 261, 98 KEY_RIGHT = 262, 99 KEY_LEFT = 263, 100 KEY_DOWN = 264, 101 KEY_UP = 265, 102 KEY_PAGE_UP = 266, 103 KEY_PAGE_DOWN = 267, 104 KEY_HOME = 268, 105 KEY_END = 269, 106 KEY_CAPS_LOCK = 280, 107 KEY_SCROLL_LOCK = 281, 108 KEY_NUM_LOCK = 282, 109 KEY_PRINT_SCREEN = 283, 110 KEY_PAUSE = 284, 111 KEY_F1 = 290, 112 KEY_F2 = 291, 113 KEY_F3 = 292, 114 KEY_F4 = 293, 115 KEY_F5 = 294, 116 KEY_F6 = 295, 117 KEY_F7 = 296, 118 KEY_F8 = 297, 119 KEY_F9 = 298, 120 KEY_F10 = 299, 121 KEY_F11 = 300, 122 KEY_F12 = 301, 123 KEY_F13 = 302, 124 KEY_F14 = 303, 125 KEY_F15 = 304, 126 KEY_F16 = 305, 127 KEY_F17 = 306, 128 KEY_F18 = 307, 129 KEY_F19 = 308, 130 KEY_F20 = 309, 131 KEY_F21 = 310, 132 KEY_F22 = 311, 133 KEY_F23 = 312, 134 KEY_F24 = 313, 135 KEY_F25 = 314, 136 KEY_KP_0 = 320, 137 KEY_KP_1 = 321, 138 KEY_KP_2 = 322, 139 KEY_KP_3 = 323, 140 KEY_KP_4 = 324, 141 KEY_KP_5 = 325, 142 KEY_KP_6 = 326, 143 KEY_KP_7 = 327, 144 KEY_KP_8 = 328, 145 KEY_KP_9 = 329, 146 KEY_KP_DECIMAL = 330, 147 KEY_KP_DIVIDE = 331, 148 KEY_KP_MULTIPLY = 332, 149 KEY_KP_SUBTRACT = 333, 150 KEY_KP_ADD = 334, 151 KEY_KP_ENTER = 335, 152 KEY_KP_EQUAL = 336, 153 KEY_LEFT_SHIFT = 340, 154 KEY_LEFT_CONTROL = 341, 155 KEY_LEFT_ALT = 342, 156 KEY_LEFT_SUPER = 343, 157 KEY_RIGHT_SHIFT = 344, 158 KEY_RIGHT_CONTROL = 345, 159 KEY_RIGHT_ALT = 346, 160 KEY_RIGHT_SUPER = 347, 161 KEY_MENU = 348, 162 KEY_LAST = KEY_MENU, 163 } 164 165 enum PointerButton : uint 166 { 167 PB_1 = 0, 168 PB_2 = 1, 169 PB_3 = 2, 170 PB_4 = 3, 171 PB_5 = 4, 172 PB_6 = 5, 173 PB_7 = 6, 174 PB_8 = 7, 175 PB_LAST = PB_8, 176 PB_LEFT = PB_1, 177 PB_RIGHT = PB_2, 178 PB_MIDDLE= PB_3, 179 }