1 /**
2 Copyright: Copyright (c) 2013-2017 Andrey Penechko.
3 License: $(WEB boost.org/LICENSE_1_0.txt, Boost License 1.0).
4 Authors: Andrey Penechko.
5 */
6 
7 module anchovy.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_WORLD_1               = 161,
68 	KEY_WORLD_2               = 162,
69 
70 	KEY_ESCAPE                = 256,
71 	KEY_ENTER                 = 257,
72 	KEY_TAB                   = 258,
73 	KEY_BACKSPACE             = 259,
74 	KEY_INSERT                = 260,
75 	KEY_DELETE                = 261,
76 	KEY_RIGHT                 = 262,
77 	KEY_LEFT                  = 263,
78 	KEY_DOWN                  = 264,
79 	KEY_UP                    = 265,
80 	KEY_PAGE_UP               = 266,
81 	KEY_PAGE_DOWN             = 267,
82 	KEY_HOME                  = 268,
83 	KEY_END                   = 269,
84 	KEY_CAPS_LOCK             = 280,
85 	KEY_SCROLL_LOCK           = 281,
86 	KEY_NUM_LOCK              = 282,
87 	KEY_PRINT_SCREEN          = 283,
88 	KEY_PAUSE                 = 284,
89 	KEY_F1                    = 290,
90 	KEY_F2                    = 291,
91 	KEY_F3                    = 292,
92 	KEY_F4                    = 293,
93 	KEY_F5                    = 294,
94 	KEY_F6                    = 295,
95 	KEY_F7                    = 296,
96 	KEY_F8                    = 297,
97 	KEY_F9                    = 298,
98 	KEY_F10                   = 299,
99 	KEY_F11                   = 300,
100 	KEY_F12                   = 301,
101 	KEY_F13                   = 302,
102 	KEY_F14                   = 303,
103 	KEY_F15                   = 304,
104 	KEY_F16                   = 305,
105 	KEY_F17                   = 306,
106 	KEY_F18                   = 307,
107 	KEY_F19                   = 308,
108 	KEY_F20                   = 309,
109 	KEY_F21                   = 310,
110 	KEY_F22                   = 311,
111 	KEY_F23                   = 312,
112 	KEY_F24                   = 313,
113 	KEY_F25                   = 314,
114 	KEY_KP_0                  = 320,
115 	KEY_KP_1                  = 321,
116 	KEY_KP_2                  = 322,
117 	KEY_KP_3                  = 323,
118 	KEY_KP_4                  = 324,
119 	KEY_KP_5                  = 325,
120 	KEY_KP_6                  = 326,
121 	KEY_KP_7                  = 327,
122 	KEY_KP_8                  = 328,
123 	KEY_KP_9                  = 329,
124 	KEY_KP_DECIMAL            = 330,
125 	KEY_KP_DIVIDE             = 331,
126 	KEY_KP_MULTIPLY           = 332,
127 	KEY_KP_SUBTRACT           = 333,
128 	KEY_KP_ADD                = 334,
129 	KEY_KP_ENTER              = 335,
130 	KEY_KP_EQUAL              = 336,
131 	KEY_LEFT_SHIFT            = 340,
132 	KEY_LEFT_CONTROL          = 341,
133 	KEY_LEFT_ALT              = 342,
134 	KEY_LEFT_SUPER            = 343,
135 	KEY_RIGHT_SHIFT           = 344,
136 	KEY_RIGHT_CONTROL         = 345,
137 	KEY_RIGHT_ALT             = 346,
138 	KEY_RIGHT_SUPER           = 347,
139 	KEY_MENU                  = 348,
140 	KEY_LAST                  =  KEY_MENU,
141 }
142 
143 enum PointerButton : uint
144 {
145 	PB_1     = 0,
146 	PB_2     = 1,
147 	PB_3     = 2,
148 	PB_4     = 3,
149 	PB_5     = 4,
150 	PB_6     = 5,
151 	PB_7     = 6,
152 	PB_8     = 7,
153 	PB_LAST  =  PB_8,
154 	PB_LEFT  =  PB_1,
155 	PB_RIGHT =  PB_2,
156 	PB_MIDDLE=  PB_3,
157 }