Antkeeper
0.0.1
src
engine
input
scancode.hpp
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2023 Christopher J. Howard
3
*
4
* This file is part of Antkeeper source code.
5
*
6
* Antkeeper source code is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* Antkeeper source code is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with Antkeeper source code. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#ifndef ANTKEEPER_INPUT_SCANCODE_HPP
21
#define ANTKEEPER_INPUT_SCANCODE_HPP
22
23
#include <cstdint>
24
25
namespace
input
{
26
32
enum class
scancode
: std::uint16_t
33
{
34
// reserved = 0x00,
35
error_roll_over
= 0x01,
36
post_fail
= 0x02,
37
error_undefined
= 0x03,
38
a
= 0x04,
39
b
= 0x05,
40
c
= 0x06,
41
d
= 0x07,
42
e
= 0x08,
43
f
= 0x09,
44
g
= 0x0a,
45
h
= 0x0b,
46
i
= 0x0c,
47
j
= 0x0d,
48
k
= 0x0e,
49
l
= 0x0f,
50
m
= 0x10,
51
n
= 0x11,
52
o
= 0x12,
53
p
= 0x13,
54
q
= 0x14,
55
r
= 0x15,
56
s
= 0x16,
57
t
= 0x17,
58
u
= 0x18,
59
v
= 0x19,
60
w
= 0x1a,
61
x
= 0x1b,
62
y
= 0x1c,
63
z
= 0x1d,
64
digit_1
= 0x1e,
65
digit_2
= 0x1f,
66
digit_3
= 0x20,
67
digit_4
= 0x21,
68
digit_5
= 0x22,
69
digit_6
= 0x23,
70
digit_7
= 0x24,
71
digit_8
= 0x25,
72
digit_9
= 0x26,
73
digit_0
= 0x27,
74
enter
= 0x28,
75
escape
= 0x29,
76
backspace
= 0x2a,
77
tab
= 0x2b,
78
space
= 0x2c,
79
minus
= 0x2d,
80
equal
= 0x2e,
81
left_brace
= 0x2f,
82
right_brace
= 0x30,
83
backslash
= 0x31,
84
non_us_hash
= 0x32,
85
semicolon
= 0x33,
86
apostrophe
= 0x34,
87
grave
= 0x35,
88
comma
= 0x36,
89
dot
= 0x37,
90
slash
= 0x38,
91
caps_lock
= 0x39,
92
f1
= 0x3a,
93
f2
= 0x3b,
94
f3
= 0x3c,
95
f4
= 0x3d,
96
f5
= 0x3e,
97
f6
= 0x3f,
98
f7
= 0x40,
99
f8
= 0x41,
100
f9
= 0x42,
101
f10
= 0x43,
102
f11
= 0x44,
103
f12
= 0x45,
104
print_screen
= 0x46,
105
scroll_lock
= 0x47,
106
pause
= 0x48,
107
insert
= 0x49,
108
home
= 0x4a,
109
page_up
= 0x4b,
110
del
= 0x4c,
111
end
= 0x4d,
112
page_down
= 0x4e,
113
right
= 0x4f,
114
left
= 0x50,
115
down
= 0x51,
116
up
= 0x52,
117
num_lock
= 0x53,
118
kp_slash
= 0x54,
119
kp_asterisk
= 0x55,
120
kp_minus
= 0x56,
121
kp_plus
= 0x57,
122
kp_enter
= 0x58,
123
kp_1
= 0x59,
124
kp_2
= 0x5a,
125
kp_3
= 0x5b,
126
kp_4
= 0x5c,
127
kp_5
= 0x5d,
128
kp_6
= 0x5e,
129
kp_7
= 0x5f,
130
kp_8
= 0x60,
131
kp_9
= 0x61,
132
kp_0
= 0x62,
133
kp_dot
= 0x63,
134
non_us_backslash
= 0x64,
135
application
= 0x65,
136
power
= 0x66,
137
kp_equal
= 0x67,
138
f13
= 0x68,
139
f14
= 0x69,
140
f15
= 0x6a,
141
f16
= 0x6b,
142
f17
= 0x6c,
143
f18
= 0x6d,
144
f19
= 0x6e,
145
f20
= 0x6f,
146
f21
= 0x70,
147
f22
= 0x71,
148
f23
= 0x72,
149
f24
= 0x73,
150
execute
= 0x74,
151
help
= 0x75,
152
menu
= 0x76,
153
select
= 0x77,
154
stop
= 0x78,
155
again
= 0x79,
156
undo
= 0x7a,
157
cut
= 0x7b,
158
copy
= 0x7c,
159
paste
= 0x7d,
160
find
= 0x7e,
161
mute
= 0x7f,
162
volume_up
= 0x80,
163
volume_down
= 0x81,
164
locking_caps_lock
= 0x82,
165
locking_num_lock
= 0x83,
166
locking_scroll_lock
= 0x84,
167
kp_comma
= 0x85,
168
kp_equal_as400
= 0x86,
169
international_1
= 0x87,
170
international_2
= 0x88,
171
international_3
= 0x89,
172
international_4
= 0x8a,
173
international_5
= 0x8b,
174
international_6
= 0x8c,
175
international_7
= 0x8d,
176
international_8
= 0x8e,
177
international_9
= 0x8f,
178
lang_1
= 0x90,
179
lang_2
= 0x91,
180
lang_3
= 0x92,
181
lang_4
= 0x93,
182
lang_5
= 0x94,
183
lang_6
= 0x95,
184
lang_7
= 0x96,
185
lang_8
= 0x97,
186
lang_9
= 0x98,
187
alt_erase
= 0x99,
188
sys_req
= 0x9a,
189
cancel
= 0x9b,
190
clear
= 0x9c,
191
prior
= 0x9d,
192
return_2
= 0x9e,
193
separator
= 0x9f,
194
_out
= 0xa0,
195
oper
= 0xa1,
196
clear_again
= 0xa2,
197
cr_sel
= 0xa3,
198
ex_sel
= 0xa4,
199
// reserved = 0xa5,
200
// reserved = 0xa6,
201
// reserved = 0xa7,
202
// reserved = 0xa8,
203
// reserved = 0xa9,
204
// reserved = 0xaa,
205
// reserved = 0xab,
206
// reserved = 0xac,
207
// reserved = 0xad,
208
// reserved = 0xae,
209
// reserved = 0xaf,
210
kp_00
= 0xb0,
211
kp_000
= 0xb1,
212
thousands_separator
= 0xb2,
213
decimal_separator
= 0xb3,
214
currency_unit
= 0xb4,
215
currency_sub_unit
= 0xb5,
216
kp_left_paren
= 0xb6,
217
kp_right_paren
= 0xb7,
218
kp_left_brace
= 0xb8,
219
kp_right_brace
= 0xb9,
220
kp_tab
= 0xba,
221
kp_backspace
= 0xbb,
222
kp_a
= 0xbc,
223
kp_b
= 0xbd,
224
kp_c
= 0xbe,
225
kp_d
= 0xbf,
226
kp_e
= 0xc0,
227
kp_f
= 0xc1,
228
kp_xor
= 0xc2,
229
kp_power
= 0xc3,
230
kp_percent
= 0xc4,
231
kp_less
= 0xc5,
232
kp_greater
= 0xc6,
233
kp_ampersand
= 0xc7,
234
kp_double_ampersand
= 0xc8,
235
kp_vertical_bar
= 0xc9,
236
kp_double_vertical_bar
= 0xca,
237
kp_colon
= 0xcb,
238
kp_hash
= 0xcc,
239
kp_space
= 0xcd,
240
kp_at
= 0xce,
241
kp_exclam
= 0xcf,
242
kp_mem_store
= 0xd0,
243
kp_mem_recall
= 0xd1,
244
kp_mem_clear
= 0xd2,
245
kp_mem_add
= 0xd3,
246
kp_mem_subtract
= 0xd4,
247
kp_mem_multiply
= 0xd5,
248
kp_mem_divide
= 0xd6,
249
kp_plus_minus
= 0xd7,
250
kp_clear
= 0xd8,
251
kp_clear_entry
= 0xd9,
252
kp_binary
= 0xda,
253
kp_octal
= 0xdb,
254
kp_decimal
= 0xdc,
255
kp_hexadecimal
= 0xdd,
256
// reserved = 0xde,
257
// reserved = 0xdf,
258
left_ctrl
= 0xe0,
259
left_shift
= 0xe1,
260
left_alt
= 0xe2,
261
left_gui
= 0xe3,
262
right_ctrl
= 0xe4,
263
right_shift
= 0xe5,
264
right_alt
= 0xe6,
265
right_gui
= 0xe7
266
// reserved = 0xe8-0xffff
267
};
268
269
}
// namespace input
270
271
#endif
// ANTKEEPER_INPUT_SCANCODE_HPP
input
Input devices, events, and mapping.
Definition:
action-events.hpp:23
input::scancode
scancode
Keyboard scancodes.
Definition:
scancode.hpp:33
input::scancode::clear
@ clear
input::scancode::kp_binary
@ kp_binary
input::scancode::kp_equal_as400
@ kp_equal_as400
input::scancode::digit_1
@ digit_1
input::scancode::s
@ s
input::scancode::kp_less
@ kp_less
input::scancode::kp_e
@ kp_e
input::scancode::kp_ampersand
@ kp_ampersand
input::scancode::kp_decimal
@ kp_decimal
input::scancode::lang_2
@ lang_2
input::scancode::digit_9
@ digit_9
input::scancode::kp_backspace
@ kp_backspace
input::scancode::kp_mem_recall
@ kp_mem_recall
input::scancode::digit_7
@ digit_7
input::scancode::a
@ a
input::scancode::kp_mem_clear
@ kp_mem_clear
input::scancode::kp_00
@ kp_00
input::scancode::international_2
@ international_2
input::scancode::home
@ home
input::scancode::cancel
@ cancel
input::scancode::copy
@ copy
input::scancode::f14
@ f14
input::scancode::kp_double_vertical_bar
@ kp_double_vertical_bar
input::scancode::num_lock
@ num_lock
input::scancode::alt_erase
@ alt_erase
input::scancode::f3
@ f3
input::scancode::lang_5
@ lang_5
input::scancode::f22
@ f22
input::scancode::international_6
@ international_6
input::scancode::kp_exclam
@ kp_exclam
input::scancode::locking_num_lock
@ locking_num_lock
input::scancode::left_alt
@ left_alt
input::scancode::error_undefined
@ error_undefined
input::scancode::kp_7
@ kp_7
input::scancode::digit_2
@ digit_2
input::scancode::h
@ h
input::scancode::kp_equal
@ kp_equal
input::scancode::non_us_hash
@ non_us_hash
input::scancode::kp_power
@ kp_power
input::scancode::l
@ l
input::scancode::undo
@ undo
input::scancode::paste
@ paste
input::scancode::left_brace
@ left_brace
input::scancode::kp_9
@ kp_9
input::scancode::_out
@ _out
input::scancode::kp_plus
@ kp_plus
input::scancode::j
@ j
input::scancode::f2
@ f2
input::scancode::application
@ application
input::scancode::currency_sub_unit
@ currency_sub_unit
input::scancode::kp_space
@ kp_space
input::scancode::kp_hexadecimal
@ kp_hexadecimal
input::scancode::grave
@ grave
input::scancode::digit_8
@ digit_8
input::scancode::f20
@ f20
input::scancode::digit_5
@ digit_5
input::scancode::kp_hash
@ kp_hash
input::scancode::y
@ y
input::scancode::lang_1
@ lang_1
input::scancode::digit_0
@ digit_0
input::scancode::equal
@ equal
input::scancode::up
@ up
input::scancode::c
@ c
input::scancode::r
@ r
input::scancode::kp_colon
@ kp_colon
input::scancode::digit_6
@ digit_6
input::scancode::right_shift
@ right_shift
input::scancode::left_shift
@ left_shift
input::scancode::locking_caps_lock
@ locking_caps_lock
input::scancode::scroll_lock
@ scroll_lock
input::scancode::international_7
@ international_7
input::scancode::kp_mem_subtract
@ kp_mem_subtract
input::scancode::volume_down
@ volume_down
input::scancode::kp_plus_minus
@ kp_plus_minus
input::scancode::thousands_separator
@ thousands_separator
input::scancode::backspace
@ backspace
input::scancode::sys_req
@ sys_req
input::scancode::caps_lock
@ caps_lock
input::scancode::non_us_backslash
@ non_us_backslash
input::scancode::f8
@ f8
input::scancode::print_screen
@ print_screen
input::scancode::f19
@ f19
input::scancode::kp_greater
@ kp_greater
input::scancode::digit_3
@ digit_3
input::scancode::kp_clear
@ kp_clear
input::scancode::apostrophe
@ apostrophe
input::scancode::international_8
@ international_8
input::scancode::lang_9
@ lang_9
input::scancode::international_1
@ international_1
input::scancode::return_2
@ return_2
input::scancode::power
@ power
input::scancode::again
@ again
input::scancode::kp_0
@ kp_0
input::scancode::f6
@ f6
input::scancode::f9
@ f9
input::scancode::help
@ help
input::scancode::lang_4
@ lang_4
input::scancode::kp_slash
@ kp_slash
input::scancode::dot
@ dot
input::scancode::kp_xor
@ kp_xor
input::scancode::f7
@ f7
input::scancode::ex_sel
@ ex_sel
input::scancode::f4
@ f4
input::scancode::m
@ m
input::scancode::kp_minus
@ kp_minus
input::scancode::f5
@ f5
input::scancode::down
@ down
input::scancode::q
@ q
input::scancode::kp_asterisk
@ kp_asterisk
input::scancode::semicolon
@ semicolon
input::scancode::u
@ u
input::scancode::n
@ n
input::scancode::right
@ right
input::scancode::kp_f
@ kp_f
input::scancode::end
@ end
input::scancode::f12
@ f12
input::scancode::left
@ left
input::scancode::d
@ d
input::scancode::right_brace
@ right_brace
input::scancode::f10
@ f10
input::scancode::kp_5
@ kp_5
input::scancode::p
@ p
input::scancode::i
@ i
input::scancode::f13
@ f13
input::scancode::k
@ k
input::scancode::kp_at
@ kp_at
input::scancode::f23
@ f23
input::scancode::f
@ f
input::scancode::b
@ b
input::scancode::kp_percent
@ kp_percent
input::scancode::kp_left_brace
@ kp_left_brace
input::scancode::left_gui
@ left_gui
input::scancode::kp_enter
@ kp_enter
input::scancode::international_5
@ international_5
input::scancode::select
@ select
input::scancode::volume_up
@ volume_up
input::scancode::x
@ x
input::scancode::v
@ v
input::scancode::slash
@ slash
input::scancode::separator
@ separator
input::scancode::f16
@ f16
input::scancode::kp_000
@ kp_000
input::scancode::kp_double_ampersand
@ kp_double_ampersand
input::scancode::kp_mem_store
@ kp_mem_store
input::scancode::kp_tab
@ kp_tab
input::scancode::kp_1
@ kp_1
input::scancode::kp_a
@ kp_a
input::scancode::kp_dot
@ kp_dot
input::scancode::decimal_separator
@ decimal_separator
input::scancode::digit_4
@ digit_4
input::scancode::g
@ g
input::scancode::kp_clear_entry
@ kp_clear_entry
input::scancode::kp_left_paren
@ kp_left_paren
input::scancode::comma
@ comma
input::scancode::currency_unit
@ currency_unit
input::scancode::kp_b
@ kp_b
input::scancode::kp_right_paren
@ kp_right_paren
input::scancode::kp_right_brace
@ kp_right_brace
input::scancode::cr_sel
@ cr_sel
input::scancode::error_roll_over
@ error_roll_over
input::scancode::f1
@ f1
input::scancode::kp_3
@ kp_3
input::scancode::kp_c
@ kp_c
input::scancode::backslash
@ backslash
input::scancode::right_alt
@ right_alt
input::scancode::post_fail
@ post_fail
input::scancode::right_gui
@ right_gui
input::scancode::lang_8
@ lang_8
input::scancode::kp_mem_multiply
@ kp_mem_multiply
input::scancode::kp_octal
@ kp_octal
input::scancode::del
@ del
input::scancode::f15
@ f15
input::scancode::f18
@ f18
input::scancode::kp_vertical_bar
@ kp_vertical_bar
input::scancode::page_down
@ page_down
input::scancode::right_ctrl
@ right_ctrl
input::scancode::clear_again
@ clear_again
input::scancode::o
@ o
input::scancode::lang_6
@ lang_6
input::scancode::kp_mem_divide
@ kp_mem_divide
input::scancode::international_3
@ international_3
input::scancode::prior
@ prior
input::scancode::minus
@ minus
input::scancode::locking_scroll_lock
@ locking_scroll_lock
input::scancode::kp_mem_add
@ kp_mem_add
input::scancode::mute
@ mute
input::scancode::kp_4
@ kp_4
input::scancode::insert
@ insert
input::scancode::escape
@ escape
input::scancode::e
@ e
input::scancode::kp_2
@ kp_2
input::scancode::enter
@ enter
input::scancode::t
@ t
input::scancode::international_4
@ international_4
input::scancode::kp_comma
@ kp_comma
input::scancode::international_9
@ international_9
input::scancode::tab
@ tab
input::scancode::find
@ find
input::scancode::execute
@ execute
input::scancode::pause
@ pause
input::scancode::stop
@ stop
input::scancode::kp_8
@ kp_8
input::scancode::w
@ w
input::scancode::left_ctrl
@ left_ctrl
input::scancode::f11
@ f11
input::scancode::lang_7
@ lang_7
input::scancode::lang_3
@ lang_3
input::scancode::kp_d
@ kp_d
input::scancode::page_up
@ page_up
input::scancode::z
@ z
input::scancode::f21
@ f21
input::scancode::oper
@ oper
input::scancode::kp_6
@ kp_6
input::scancode::f17
@ f17
input::scancode::cut
@ cut
input::scancode::space
@ space
input::scancode::f24
@ f24
menu
Definition:
menu.cpp:29