15 #ifndef FPLBASE_KEYBOARD_KEYCODES_H
16 #define FPLBASE_KEYBOARD_KEYCODES_H
19 #include "fplbase/config.h"
47 typedef int32_t FPL_Keycode;
49 #define FPLK_SCANCODE_MASK (1 << 30)
50 #define FPL_SCANCODE_TO_KEYCODE(X) (X | FPLK_SCANCODE_MASK)
56 FPLK_BACKSPACE =
'\b',
67 FPLK_RIGHTPAREN =
')',
94 FPLK_LEFTBRACKET =
'[',
95 FPLK_BACKSLASH =
'\\',
96 FPLK_RIGHTBRACKET =
']',
98 FPLK_UNDERSCORE =
'_',
145 FPLK_DELETE =
'\177',
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),
265 FPLK_RCTRL = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_RCTRL),
266 FPLK_RSHIFT = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_RSHIFT),
269 FPLK_MODE = FPL_SCANCODE_TO_KEYCODE(FPL_SCANCODE_MODE),
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),
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),
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),
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
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)
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