Raito
0.1
Loading...
Searching...
No Matches
KeyCodes.h
Go to the documentation of this file.
1
/*
2
MIT License
3
4
Copyright (c) 2023 Víctor Falcón Zaro
5
6
Permission is hereby granted, free of charge, to any person obtaining a copy
7
of this software and associated documentation files (the "Software"), to deal
8
in the Software without restriction, including without limitation the rights
9
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
copies of the Software, and to permit persons to whom the Software is
11
furnished to do so, subject to the following conditions:
12
13
The above copyright notice and this permission notice shall be included in all
14
copies or substantial portions of the Software.
15
16
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
SOFTWARE.
23
*/
24
25
#pragma once
26
27
namespace
Raito
28
{
29
typedef
enum class
KeyCode
: uint16_t
30
{
31
// From glfw3.h
32
Space
= 32,
33
Apostrophe
= 39,
/* ' */
34
Comma
= 44,
/* , */
35
Minus
= 45,
/* - */
36
Period
= 46,
/* . */
37
Slash
= 47,
/* / */
38
39
D0
= 48,
/* 0 */
40
D1
= 49,
/* 1 */
41
D2
= 50,
/* 2 */
42
D3
= 51,
/* 3 */
43
D4
= 52,
/* 4 */
44
D5
= 53,
/* 5 */
45
D6
= 54,
/* 6 */
46
D7
= 55,
/* 7 */
47
D8
= 56,
/* 8 */
48
D9
= 57,
/* 9 */
49
50
Semicolon
= 59,
/* ; */
51
Equal
= 61,
/* = */
52
53
A
= 65,
54
B
= 66,
55
C
= 67,
56
D
= 68,
57
E
= 69,
58
F
= 70,
59
G
= 71,
60
H
= 72,
61
I
= 73,
62
J
= 74,
63
K
= 75,
64
L
= 76,
65
M
= 77,
66
N
= 78,
67
O
= 79,
68
P
= 80,
69
Q
= 81,
70
R
= 82,
71
S
= 83,
72
T
= 84,
73
U
= 85,
74
V
= 86,
75
W
= 87,
76
X
= 88,
77
Y
= 89,
78
Z
= 90,
79
80
LeftBracket
= 91,
/* [ */
81
Backslash
= 92,
/* \ */
82
RightBracket
= 93,
/* ] */
83
GraveAccent
= 96,
/* ` */
84
85
World1
= 161,
/* non-US #1 */
86
World2
= 162,
/* non-US #2 */
87
88
/* Function keys */
89
Escape
= 256,
90
Enter
= 257,
91
Tab
= 258,
92
Backspace
= 259,
93
Insert
= 260,
94
Delete
= 261,
95
Right
= 262,
96
Left
= 263,
97
Down
= 264,
98
Up
= 265,
99
PageUp
= 266,
100
PageDown
= 267,
101
Home
= 268,
102
End
= 269,
103
CapsLock
= 280,
104
ScrollLock
= 281,
105
NumLock
= 282,
106
PrintScreen
= 283,
107
Pause
= 284,
108
F1
= 290,
109
F2
= 291,
110
F3
= 292,
111
F4
= 293,
112
F5
= 294,
113
F6
= 295,
114
F7
= 296,
115
F8
= 297,
116
F9
= 298,
117
F10
= 299,
118
F11
= 300,
119
F12
= 301,
120
F13
= 302,
121
F14
= 303,
122
F15
= 304,
123
F16
= 305,
124
F17
= 306,
125
F18
= 307,
126
F19
= 308,
127
F20
= 309,
128
F21
= 310,
129
F22
= 311,
130
F23
= 312,
131
F24
= 313,
132
F25
= 314,
133
134
/* Keypad */
135
KP0
= 320,
136
KP1
= 321,
137
KP2
= 322,
138
KP3
= 323,
139
KP4
= 324,
140
KP5
= 325,
141
KP6
= 326,
142
KP7
= 327,
143
KP8
= 328,
144
KP9
= 329,
145
KPDecimal
= 330,
146
KPDivide
= 331,
147
KPMultiply
= 332,
148
KPSubtract
= 333,
149
KPAdd
= 334,
150
KPEnter
= 335,
151
KPEqual
= 336,
152
153
LeftShift
= 340,
154
LeftControl
= 341,
155
LeftAlt
= 342,
156
LeftSuper
= 343,
157
RightShift
= 344,
158
RightControl
= 345,
159
RightAlt
= 346,
160
RightSuper
= 347,
161
Menu
= 348
162
}
Key
;
163
164
enum class
KeyState
165
{
166
None
= -1,
167
Pressed
,
168
Held
,
169
Released
170
};
171
172
enum class
CursorMode
173
{
174
Normal
= 0,
175
Hidden
= 1,
176
Locked
= 2
177
};
178
179
typedef
enum class
MouseButton
: uint16_t
180
{
181
Button0
= 0,
182
Button1
= 1,
183
Button2
= 2,
184
Button3
= 3,
185
Button4
= 4,
186
Button5
= 5,
187
Left
=
Button0
,
188
Right
=
Button1
,
189
Middle
=
Button2
190
}
Button
;
191
192
193
inline
std::ostream&
operator<<
(std::ostream& os,
KeyCode
keyCode)
194
{
195
os << static_cast<int32_t>(keyCode);
196
return
os;
197
}
198
199
inline
std::ostream&
operator<<
(std::ostream& os,
MouseButton
button)
200
{
201
os << static_cast<int32_t>(button);
202
return
os;
203
}
204
}
Raito
Definition
AssetImport.cpp:47
Raito::MouseButton
MouseButton
Definition
KeyCodes.h:180
Raito::MouseButton::Button1
@ Button1
Raito::MouseButton::Button3
@ Button3
Raito::MouseButton::Button4
@ Button4
Raito::MouseButton::Middle
@ Middle
Raito::MouseButton::Button0
@ Button0
Raito::MouseButton::Button2
@ Button2
Raito::MouseButton::Button5
@ Button5
Raito::operator<<
std::ostream & operator<<(std::ostream &os, KeyCode keyCode)
Definition
KeyCodes.h:193
Raito::CursorMode
CursorMode
Definition
KeyCodes.h:173
Raito::CursorMode::Hidden
@ Hidden
Raito::CursorMode::Normal
@ Normal
Raito::CursorMode::Locked
@ Locked
Raito::Key
enum Raito::KeyCode Key
Raito::Button
enum Raito::MouseButton Button
Raito::KeyCode
KeyCode
Definition
KeyCodes.h:30
Raito::KeyCode::Escape
@ Escape
Raito::KeyCode::X
@ X
Raito::KeyCode::Down
@ Down
Raito::KeyCode::RightSuper
@ RightSuper
Raito::KeyCode::C
@ C
Raito::KeyCode::D0
@ D0
Raito::KeyCode::Pause
@ Pause
Raito::KeyCode::Period
@ Period
Raito::KeyCode::F6
@ F6
Raito::KeyCode::Z
@ Z
Raito::KeyCode::F14
@ F14
Raito::KeyCode::D4
@ D4
Raito::KeyCode::Up
@ Up
Raito::KeyCode::KPAdd
@ KPAdd
Raito::KeyCode::KP7
@ KP7
Raito::KeyCode::RightShift
@ RightShift
Raito::KeyCode::KP3
@ KP3
Raito::KeyCode::Slash
@ Slash
Raito::KeyCode::F5
@ F5
Raito::KeyCode::E
@ E
Raito::KeyCode::KP2
@ KP2
Raito::KeyCode::P
@ P
Raito::KeyCode::Minus
@ Minus
Raito::KeyCode::GraveAccent
@ GraveAccent
Raito::KeyCode::RightBracket
@ RightBracket
Raito::KeyCode::KPDivide
@ KPDivide
Raito::KeyCode::F7
@ F7
Raito::KeyCode::F8
@ F8
Raito::KeyCode::LeftBracket
@ LeftBracket
Raito::KeyCode::D1
@ D1
Raito::KeyCode::F3
@ F3
Raito::KeyCode::LeftSuper
@ LeftSuper
Raito::KeyCode::U
@ U
Raito::KeyCode::KP4
@ KP4
Raito::KeyCode::V
@ V
Raito::KeyCode::KP9
@ KP9
Raito::KeyCode::F16
@ F16
Raito::KeyCode::Y
@ Y
Raito::KeyCode::Comma
@ Comma
Raito::KeyCode::Tab
@ Tab
Raito::KeyCode::S
@ S
Raito::KeyCode::W
@ W
Raito::KeyCode::LeftControl
@ LeftControl
Raito::KeyCode::F11
@ F11
Raito::KeyCode::KPMultiply
@ KPMultiply
Raito::KeyCode::M
@ M
Raito::KeyCode::KP1
@ KP1
Raito::KeyCode::World1
@ World1
Raito::KeyCode::KPDecimal
@ KPDecimal
Raito::KeyCode::KPEqual
@ KPEqual
Raito::KeyCode::F21
@ F21
Raito::KeyCode::ScrollLock
@ ScrollLock
Raito::KeyCode::F22
@ F22
Raito::KeyCode::A
@ A
Raito::KeyCode::F
@ F
Raito::KeyCode::F18
@ F18
Raito::KeyCode::RightControl
@ RightControl
Raito::KeyCode::KP0
@ KP0
Raito::KeyCode::End
@ End
Raito::KeyCode::F23
@ F23
Raito::KeyCode::F9
@ F9
Raito::KeyCode::World2
@ World2
Raito::KeyCode::Home
@ Home
Raito::KeyCode::CapsLock
@ CapsLock
Raito::KeyCode::N
@ N
Raito::KeyCode::KP8
@ KP8
Raito::KeyCode::Right
@ Right
Raito::KeyCode::Left
@ Left
Raito::KeyCode::D7
@ D7
Raito::KeyCode::KP5
@ KP5
Raito::KeyCode::F13
@ F13
Raito::KeyCode::LeftAlt
@ LeftAlt
Raito::KeyCode::Semicolon
@ Semicolon
Raito::KeyCode::LeftShift
@ LeftShift
Raito::KeyCode::PageUp
@ PageUp
Raito::KeyCode::B
@ B
Raito::KeyCode::D3
@ D3
Raito::KeyCode::Insert
@ Insert
Raito::KeyCode::K
@ K
Raito::KeyCode::F25
@ F25
Raito::KeyCode::D9
@ D9
Raito::KeyCode::D8
@ D8
Raito::KeyCode::F10
@ F10
Raito::KeyCode::Menu
@ Menu
Raito::KeyCode::Apostrophe
@ Apostrophe
Raito::KeyCode::T
@ T
Raito::KeyCode::PrintScreen
@ PrintScreen
Raito::KeyCode::H
@ H
Raito::KeyCode::D2
@ D2
Raito::KeyCode::KPSubtract
@ KPSubtract
Raito::KeyCode::KPEnter
@ KPEnter
Raito::KeyCode::F19
@ F19
Raito::KeyCode::Backspace
@ Backspace
Raito::KeyCode::NumLock
@ NumLock
Raito::KeyCode::L
@ L
Raito::KeyCode::Space
@ Space
Raito::KeyCode::RightAlt
@ RightAlt
Raito::KeyCode::I
@ I
Raito::KeyCode::G
@ G
Raito::KeyCode::D6
@ D6
Raito::KeyCode::F1
@ F1
Raito::KeyCode::R
@ R
Raito::KeyCode::F15
@ F15
Raito::KeyCode::F4
@ F4
Raito::KeyCode::F12
@ F12
Raito::KeyCode::D5
@ D5
Raito::KeyCode::F24
@ F24
Raito::KeyCode::PageDown
@ PageDown
Raito::KeyCode::Q
@ Q
Raito::KeyCode::Enter
@ Enter
Raito::KeyCode::O
@ O
Raito::KeyCode::Delete
@ Delete
Raito::KeyCode::KP6
@ KP6
Raito::KeyCode::Equal
@ Equal
Raito::KeyCode::D
@ D
Raito::KeyCode::Backslash
@ Backslash
Raito::KeyCode::F20
@ F20
Raito::KeyCode::F2
@ F2
Raito::KeyCode::J
@ J
Raito::KeyCode::F17
@ F17
Raito::KeyState
KeyState
Definition
KeyCodes.h:165
Raito::KeyState::None
@ None
Raito::KeyState::Pressed
@ Pressed
Raito::KeyState::Released
@ Released
Raito::KeyState::Held
@ Held
Core
Source
Raito
Input
KeyCodes.h
Generated by
1.11.0