FPLBase
An open source project by FPL.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
keyboard_keycodes.h
Go to the documentation of this file.
1 // Copyright 2014 Google Inc. All rights reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef FPLBASE_KEYBOARD_KEYCODES_H
16 #define FPLBASE_KEYBOARD_KEYCODES_H
17 
18 #include <stdint.h>
19 #include "fplbase/config.h" // Must come first.
20 
21 #include "keyboard_scancodes.h"
22 
23 namespace fplbase {
24 
25 /// @file
26 /// @defgroup fplbase_key_codes Key Codes
27 /// @brief Keyboard key codes used by FPLBase, which correspond to a key press's
28 /// value, as mapped by the current operating system. This is ideal for
29 /// character-dependent controls.
30 ///
31 /// For example, let's imagine a game that requires the `a` key to be pressed to
32 /// trigger `a` for <b>a</b>ttack. If a player mapped a given key (`a`),
33 /// on the physical keyboard, to produce the German a-umlaut (`รค`), then this
34 /// key would no longer produce the `FPLK_a` keycode (but it <b>would</b> still
35 /// produce the `FPL_SCANCODE_A`, which may not be what the user expects).
36 ///
37 /// Let's pretend they now have mapped `F1` to generate the actual `a`
38 /// keystroke. They would expect to press `F1` to generate the `a` keystroke for
39 /// <b>a</b>ttack, which would correctly correspond to the `FPLK_a`
40 /// keycode, but would generate the incorrect scancode `FPL_SCANCODE_F1`.
41 ///
42 /// @ingroup fplbase_keyboardcodes
43 /// @{
44 
45 // Keycodes used by FPL:
46 
47 typedef int32_t FPL_Keycode;
48 
49 #define FPLK_SCANCODE_MASK (1 << 30)
50 #define FPL_SCANCODE_TO_KEYCODE(X) (X | FPLK_SCANCODE_MASK)
51 
52 enum {
53  FPLK_UNKNOWN = 0,
54  FPLK_RETURN = '\r',
55  FPLK_ESCAPE = '\033',
56  FPLK_BACKSPACE = '\b',
57  FPLK_TAB = '\t',
58  FPLK_SPACE = ' ',
59  FPLK_EXCLAIM = '!',
60  FPLK_QUOTEDBL = '"',
61  FPLK_HASH = '#',
62  FPLK_PERCENT = '%',
63  FPLK_DOLLAR = '$',
64  FPLK_AMPERSAND = '&',
65  FPLK_QUOTE = '\'',
66  FPLK_LEFTPAREN = '(',
67  FPLK_RIGHTPAREN = ')',
68  FPLK_ASTERISK = '*',
69  FPLK_PLUS = '+',
70  FPLK_COMMA = ',',
71  FPLK_MINUS = '-',
72  FPLK_PERIOD = '.',
73  FPLK_SLASH = '/',
74  FPLK_0 = '0',
75  FPLK_1 = '1',
76  FPLK_2 = '2',
77  FPLK_3 = '3',
78  FPLK_4 = '4',
79  FPLK_5 = '5',
80  FPLK_6 = '6',
81  FPLK_7 = '7',
82  FPLK_8 = '8',
83  FPLK_9 = '9',
84  FPLK_COLON = ':',
85  FPLK_SEMICOLON = ';',
86  FPLK_LESS = '<',
87  FPLK_EQUALS = '=',
88  FPLK_GREATER = '>',
89  FPLK_QUESTION = '?',
90  FPLK_AT = '@',
91  /*
92  Skip uppercase letters
93  */
94  FPLK_LEFTBRACKET = '[',
95  FPLK_BACKSLASH = '\\',
96  FPLK_RIGHTBRACKET = ']',
97  FPLK_CARET = '^',
98  FPLK_UNDERSCORE = '_',
99  FPLK_BACKQUOTE = '`',
100  FPLK_a = 'a',
101  FPLK_b = 'b',
102  FPLK_c = 'c',
103  FPLK_d = 'd',
104  FPLK_e = 'e',
105  FPLK_f = 'f',
106  FPLK_g = 'g',
107  FPLK_h = 'h',
108  FPLK_i = 'i',
109  FPLK_j = 'j',
110  FPLK_k = 'k',
111  FPLK_l = 'l',
112  FPLK_m = 'm',
113  FPLK_n = 'n',
114  FPLK_o = 'o',
115  FPLK_p = 'p',
116  FPLK_q = 'q',
117  FPLK_r = 'r',
118  FPLK_s = 's',
119  FPLK_t = 't',
120  FPLK_u = 'u',
121  FPLK_v = 'v',
122  FPLK_w = 'w',
123  FPLK_x = 'x',
124  FPLK_y = 'y',
125  FPLK_z = 'z',
126  FPLK_CAPSLOCK = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_CAPSLOCK),
127  FPLK_F1 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F1),
128  FPLK_F2 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F2),
129  FPLK_F3 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F3),
130  FPLK_F4 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F4),
131  FPLK_F5 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F5),
132  FPLK_F6 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F6),
133  FPLK_F7 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F7),
134  FPLK_F8 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F8),
135  FPLK_F9 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F9),
136  FPLK_F10 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F10),
137  FPLK_F11 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F11),
138  FPLK_F12 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F12),
139  FPLK_PRINTSCREEN = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_PRINTSCREEN),
140  FPLK_SCROLLLOCK = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_SCROLLLOCK),
141  FPLK_PAUSE = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_PAUSE),
142  FPLK_INSERT = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_INSERT),
143  FPLK_HOME = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_HOME),
144  FPLK_PAGEUP = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_PAGEUP),
145  FPLK_DELETE = '\177',
146  FPLK_END = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_END),
147  FPLK_PAGEDOWN = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_PAGEDOWN),
148  FPLK_RIGHT = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_RIGHT),
149  FPLK_LEFT = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_LEFT),
150  FPLK_DOWN = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_DOWN),
151  FPLK_UP = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_UP),
152  FPLK_NUMLOCKCLEAR = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_NUMLOCKCLEAR),
153  FPLK_KP_DIVIDE = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_DIVIDE),
154  FPLK_KP_MULTIPLY = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_MULTIPLY),
155  FPLK_KP_MINUS = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_MINUS),
156  FPLK_KP_PLUS = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_PLUS),
157  FPLK_KP_ENTER = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_ENTER),
158  FPLK_KP_1 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_1),
159  FPLK_KP_2 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_2),
160  FPLK_KP_3 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_3),
161  FPLK_KP_4 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_4),
162  FPLK_KP_5 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_5),
163  FPLK_KP_6 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_6),
164  FPLK_KP_7 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_7),
165  FPLK_KP_8 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_8),
166  FPLK_KP_9 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_9),
167  FPLK_KP_0 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_0),
168  FPLK_KP_PERIOD = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_PERIOD),
169  FPLK_APPLICATION = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_APPLICATION),
170  FPLK_POWER = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_POWER),
171  FPLK_KP_EQUALS = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_EQUALS),
172  FPLK_F13 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F13),
173  FPLK_F14 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F14),
174  FPLK_F15 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F15),
175  FPLK_F16 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F16),
176  FPLK_F17 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F17),
177  FPLK_F18 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F18),
178  FPLK_F19 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F19),
179  FPLK_F20 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F20),
180  FPLK_F21 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F21),
181  FPLK_F22 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F22),
182  FPLK_F23 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F23),
183  FPLK_F24 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_F24),
184  FPLK_EXECUTE = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_EXECUTE),
185  FPLK_HELP = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_HELP),
186  FPLK_MENU = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_MENU),
187  FPLK_SELECT = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_SELECT),
188  FPLK_STOP = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_STOP),
189  FPLK_AGAIN = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_AGAIN),
190  FPLK_UNDO = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_UNDO),
191  FPLK_CUT = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_CUT),
192  FPLK_COPY = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_COPY),
193  FPLK_PASTE = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_PASTE),
194  FPLK_FIND = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_FIND),
195  FPLK_MUTE = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_MUTE),
196  FPLK_VOLUMEUP = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_VOLUMEUP),
197  FPLK_VOLUMEDOWN = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_VOLUMEDOWN),
198  FPLK_KP_COMMA = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_COMMA),
199  FPLK_KP_EQUALSAS400 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_EQUALSAS400),
200  FPLK_ALTERASE = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_ALTERASE),
201  FPLK_SYSREQ = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_SYSREQ),
202  FPLK_CANCEL = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_CANCEL),
203  FPLK_CLEAR = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_CLEAR),
204  FPLK_PRIOR = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_PRIOR),
205  FPLK_RETURN2 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_RETURN2),
206  FPLK_SEPARATOR = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_SEPARATOR),
207  FPLK_OUT = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_OUT),
208  FPLK_OPER = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_OPER),
209  FPLK_CLEARAGAIN = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_CLEARAGAIN),
210  FPLK_CRSEL = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_CRSEL),
211  FPLK_EXSEL = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_EXSEL),
212  FPLK_KP_00 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_00),
213  FPLK_KP_000 = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_000),
214  FPLK_THOUSANDSSEPARATOR =
215  FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_THOUSANDSSEPARATOR),
216  FPLK_DECIMALSEPARATOR =
217  FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_DECIMALSEPARATOR),
218  FPLK_CURRENCYUNIT = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_CURRENCYUNIT),
219  FPLK_CURRENCYSUBUNIT = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_CURRENCYSUBUNIT),
220  FPLK_KP_LEFTPAREN = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_LEFTPAREN),
221  FPLK_KP_RIGHTPAREN = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_RIGHTPAREN),
222  FPLK_KP_LEFTBRACE = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_LEFTBRACE),
223  FPLK_KP_RIGHTBRACE = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_RIGHTBRACE),
224  FPLK_KP_TAB = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_TAB),
225  FPLK_KP_BACKSPACE = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_BACKSPACE),
226  FPLK_KP_A = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_A),
227  FPLK_KP_B = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_B),
228  FPLK_KP_C = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_C),
229  FPLK_KP_D = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_D),
230  FPLK_KP_E = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_E),
231  FPLK_KP_F = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_F),
232  FPLK_KP_XOR = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_XOR),
233  FPLK_KP_POWER = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_POWER),
234  FPLK_KP_PERCENT = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_PERCENT),
235  FPLK_KP_LESS = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_LESS),
236  FPLK_KP_GREATER = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_GREATER),
237  FPLK_KP_AMPERSAND = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_AMPERSAND),
238  FPLK_KP_DBLAMPERSAND = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_DBLAMPERSAND),
239  FPLK_KP_VERTICALBAR = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_VERTICALBAR),
240  FPLK_KP_DBLVERTICALBAR =
241  FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_DBLVERTICALBAR),
242  FPLK_KP_COLON = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_COLON),
243  FPLK_KP_HASH = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_HASH),
244  FPLK_KP_SPACE = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_SPACE),
245  FPLK_KP_AT = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_AT),
246  FPLK_KP_EXCLAM = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_EXCLAM),
247  FPLK_KP_MEMSTORE = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_MEMSTORE),
248  FPLK_KP_MEMRECALL = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_MEMRECALL),
249  FPLK_KP_MEMCLEAR = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_MEMCLEAR),
250  FPLK_KP_MEMADD = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_MEMADD),
251  FPLK_KP_MEMSUBTRACT = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_MEMSUBTRACT),
252  FPLK_KP_MEMMULTIPLY = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_MEMMULTIPLY),
253  FPLK_KP_MEMDIVIDE = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_MEMDIVIDE),
254  FPLK_KP_PLUSMINUS = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_PLUSMINUS),
255  FPLK_KP_CLEAR = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_CLEAR),
256  FPLK_KP_CLEARENTRY = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_CLEARENTRY),
257  FPLK_KP_BINARY = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_BINARY),
258  FPLK_KP_OCTAL = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_OCTAL),
259  FPLK_KP_DECIMAL = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_DECIMAL),
260  FPLK_KP_HEXADECIMAL = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KP_HEXADECIMAL),
261  FPLK_LCTRL = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_LCTRL),
262  FPLK_LSHIFT = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_LSHIFT),
263  FPLK_LALT = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_LALT),
264  FPLK_LGUI = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_LGUI),
265  FPLK_RCTRL = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_RCTRL),
266  FPLK_RSHIFT = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_RSHIFT),
267  FPLK_RALT = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_RALT),
268  FPLK_RGUI = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_RGUI),
269  FPLK_MODE = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_MODE),
270  FPLK_AUDIONEXT = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_AUDIONEXT),
271  FPLK_AUDIOPREV = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_AUDIOPREV),
272  FPLK_AUDIOSTOP = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_AUDIOSTOP),
273  FPLK_AUDIOPLAY = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_AUDIOPLAY),
274  FPLK_AUDIOMUTE = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_AUDIOMUTE),
275  FPLK_MEDIASELECT = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_MEDIASELECT),
276  FPLK_WWW = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_WWW),
277  FPLK_MAIL = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_MAIL),
278  FPLK_CALCULATOR = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_CALCULATOR),
279  FPLK_COMPUTER = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_COMPUTER),
280  FPLK_AC_SEARCH = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_AC_SEARCH),
281  FPLK_AC_HOME = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_AC_HOME),
282  FPLK_AC_BACK = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_AC_BACK),
283  FPLK_AC_FORWARD = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_AC_FORWARD),
284  FPLK_AC_STOP = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_AC_STOP),
285  FPLK_AC_REFRESH = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_AC_REFRESH),
286  FPLK_AC_BOOKMARKS = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_AC_BOOKMARKS),
287  FPLK_BRIGHTNESSDOWN = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_BRIGHTNESSDOWN),
288  FPLK_BRIGHTNESSUP = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_BRIGHTNESSUP),
289  FPLK_DISPLAYSWITCH = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_DISPLAYSWITCH),
290  FPLK_KBDILLUMTOGGLE = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KBDILLUMTOGGLE),
291  FPLK_KBDILLUMDOWN = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KBDILLUMDOWN),
292  FPLK_KBDILLUMUP = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_KBDILLUMUP),
293  FPLK_EJECT = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_EJECT),
294  FPLK_SLEEP = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_SLEEP)
295 };
296 
297 /**
298  * \brief Enumeration of valid key mods (possibly OR'd together).
299  */
300 typedef enum {
301  FPL_KMOD_NONE = 0x0000,
302  FPL_KMOD_LSHIFT = 0x0001,
303  FPL_KMOD_RSHIFT = 0x0002,
304  FPL_KMOD_LCTRL = 0x0040,
305  FPL_KMOD_RCTRL = 0x0080,
306  FPL_KMOD_LALT = 0x0100,
307  FPL_KMOD_RALT = 0x0200,
308  FPL_KMOD_LGUI = 0x0400,
309  FPL_KMOD_RGUI = 0x0800,
310  FPL_KMOD_NUM = 0x1000,
311  FPL_KMOD_CAPS = 0x2000,
312  FPL_KMOD_MODE = 0x4000,
313  FPL_KMOD_RESERVED = 0x8000
314 } FPL_Keymod;
315 
316 #define FPL_KMOD_CTRL (::fplbase::FPL_KMOD_LCTRL | ::fplbase::FPL_KMOD_RCTRL)
317 #define FPL_KMOD_SHIFT (::fplbase::FPL_KMOD_LSHIFT | ::fplbase::FPL_KMOD_RSHIFT)
318 #define FPL_KMOD_ALT (::fplbase::FPL_KMOD_LALT | ::fplbase::FPL_KMOD_RALT)
319 #define FPL_KMOD_GUI (::fplbase::FPL_KMOD_LGUI | ::fplbase::FPL_KMOD_RGUI)
320 
321 /// @}
322 } // namespace fplbase
323 
324 #endif // FPLBASE_KEYBOARD_KEYCODES_H
Definition: keyboard_scancodes.h:218
Definition: keyboard_scancodes.h:163
Definition: keyboard_scancodes.h:226
Definition: keyboard_scancodes.h:153
Definition: keyboard_scancodes.h:230
Definition: keyboard_scancodes.h:356
Definition: keyboard_scancodes.h:186
Definition: keyboard_scancodes.h:211
Definition: keyboard_scancodes.h:182
Definition: keyboard_scancodes.h:215
Definition: keyboard_scancodes.h:334
Definition: keyboard_scancodes.h:210
Definition: keyboard_scancodes.h:214
Definition: keyboard_scancodes.h:156
Definition: keyboard_scancodes.h:160
Definition: keyboard_scancodes.h:229
Definition: keyboard_scancodes.h:335
Definition: keyboard_scancodes.h:172
Definition: keyboard_scancodes.h:164
Definition: keyboard_scancodes.h:190
Definition: keyboard_scancodes.h:162
Definition: keyboard_scancodes.h:241
Definition: keyboard_scancodes.h:223
Definition: keyboard_scancodes.h:165
Definition: keyboard_scancodes.h:222
Definition: keyboard_scancodes.h:333
Definition: keyboard_scancodes.h:231
Definition: keyboard_scancodes.h:176
Definition: keyboard_scancodes.h:321
Definition: keyboard_scancodes.h:193
Definition: keyboard_scancodes.h:234
Definition: keyboard_scancodes.h:225
Definition: keyboard_scancodes.h:217
Definition: keyboard_scancodes.h:183
Definition: keyboard_scancodes.h:157
Definition: keyboard_scancodes.h:227
Definition: keyboard_scancodes.h:220
Definition: keyboard_scancodes.h:184
Definition: keyboard_scancodes.h:235
Definition: keyboard_scancodes.h:232
Definition: keyboard_scancodes.h:325
Definition: keyboard_scancodes.h:149
Definition: keyboard_scancodes.h:185
Definition: keyboard_scancodes.h:168
Definition: keyboard_scancodes.h:349
Definition: keyboard_scancodes.h:173
FPL_Keymod
Enumeration of valid key mods (possibly OR'd together).
Definition: keyboard_keycodes.h:300
Definition: keyboard_scancodes.h:181
Definition: keyboard_scancodes.h:221
Definition: keyboard_scancodes.h:174
Definition: keyboard_scancodes.h:170
Definition: keyboard_scancodes.h:326
Definition: keyboard_scancodes.h:150
Definition: keyboard_scancodes.h:167
Definition: keyboard_scancodes.h:171
Definition: keyboard_scancodes.h:339
Definition: keyboard_scancodes.h:219
Definition: keyboard_scancodes.h:192
Definition: keyboard_scancodes.h:152
Definition: keyboard_scancodes.h:213
Definition: keyboard_scancodes.h:161
Definition: keyboard_scancodes.h:158
Definition: keyboard_scancodes.h:228
Definition: keyboard_scancodes.h:355
Definition: keyboard_scancodes.h:180
Definition: keyboard_scancodes.h:188
Definition: keyboard_scancodes.h:191
Definition: keyboard_scancodes.h:261
Definition: keyboard_scancodes.h:209
Definition: keyboard_scancodes.h:350
Definition: keyboard_scancodes.h:331
Definition: keyboard_scancodes.h:175
Definition: keyboard_scancodes.h:205
Definition: keyboard_scancodes.h:187
Definition: keyboard_scancodes.h:151
Definition: keyboard_scancodes.h:224
Definition: keyboard_scancodes.h:189
Definition: keyboard_scancodes.h:179
Definition: keyboard_scancodes.h:348
Definition: keyboard_scancodes.h:233
Definition: keyboard_scancodes.h:332
Definition: keyboard_scancodes.h:159
Definition: keyboard_scancodes.h:322
Definition: keyboard_scancodes.h:155
Definition: keyboard_scancodes.h:212
Definition: keyboard_scancodes.h:240
Definition: keyboard_scancodes.h:194
Definition: keyboard_scancodes.h:206
Definition: keyboard_scancodes.h:154
Definition: keyboard_scancodes.h:216