Berserk
code
runtime
platform
InputDefs.hpp
Go to the documentation of this file.
1
/**********************************************************************************/
2
/* This file is part of Berserk Engine project */
3
/* https://github.com/EgorOrachyov/Berserk */
4
/**********************************************************************************/
5
/* MIT License */
6
/* */
7
/* Copyright (c) 2018 - 2021 Egor Orachyov */
8
/* */
9
/* Permission is hereby granted, free of charge, to any person obtaining a copy */
10
/* of this software and associated documentation files (the "Software"), to deal */
11
/* in the Software without restriction, including without limitation the rights */
12
/* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell */
13
/* copies of the Software, and to permit persons to whom the Software is */
14
/* furnished to do so, subject to the following conditions: */
15
/* */
16
/* The above copyright notice and this permission notice shall be included in all */
17
/* copies or substantial portions of the Software. */
18
/* */
19
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR */
20
/* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, */
21
/* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE */
22
/* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER */
23
/* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, */
24
/* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */
25
/* SOFTWARE. */
26
/**********************************************************************************/
27
28
#ifndef BERSERK_INPUTDEFS_HPP
29
#define BERSERK_INPUTDEFS_HPP
30
31
#include <
core/Config.hpp
>
32
#include <
core/Typedefs.hpp
>
33
#include <
core/templates/Mask.hpp
>
34
35
BRK_NS_BEGIN
36
46
enum class
InputDeviceState
{
47
Connected
,
48
Disconnected
,
49
Unknown
50
};
51
56
enum class
InputAction
:
uint32
{
58
Press
= 0,
60
Release
= 1,
62
Repeat
= 2,
64
Move
= 3,
66
Text
= 4,
68
State
= 5,
70
Unknown
= 0xffffffff
71
};
72
77
enum class
InputModifier
:
uint32
{
78
Shift
= 0,
79
Alt
= 1,
80
Control
= 2,
81
CapsLock
= 3,
82
NumLock
= 4
83
};
84
89
using
InputModifiers
=
Mask<InputModifier, 5>
;
90
95
enum class
InputMouseButton
:
uint32
{
96
Left
= 0,
97
Right
= 1,
98
Unknown
= 0xffffffff
99
};
100
105
enum class
InputKeyboardKey
:
uint32
{
106
Space
= 0,
107
Apostrophe
= 1,
/* ' */
108
Comma
= 2,
/* , */
109
Minus
= 3,
/* - */
110
Period
= 4,
/* . */
111
Slash
= 5,
/* / */
112
BackSlash
= 6,
/* \ */
113
Semicolon
= 7,
/* ; */
114
Equal
= 8,
/* = */
115
LeftBracket
= 9,
/* [ */
116
RightBracket
= 10,
/* ] */
117
Num0
= 11,
118
Num1
= 12,
119
Num2
= 13,
120
Num3
= 14,
121
Num4
= 15,
122
Num5
= 16,
123
Num6
= 17,
124
Num7
= 18,
125
Num8
= 19,
126
Num9
= 20,
127
A
= 21,
128
B
= 22,
129
C
= 23,
130
D
= 24,
131
E
= 25,
132
F
= 26,
133
G
= 27,
134
H
= 28,
135
I
= 29,
136
J
= 30,
137
K
= 31,
138
L
= 32,
139
M
= 33,
140
N
= 34,
141
O
= 35,
142
P
= 36,
143
Q
= 37,
144
R
= 38,
145
S
= 39,
146
T
= 44,
147
U
= 41,
148
V
= 42,
149
W
= 43,
150
X
= 44,
151
Y
= 45,
152
Z
= 46,
153
Escape
= 47,
154
Enter
= 48,
155
Tab
= 49,
156
Backspace
= 50,
157
Insert
= 51,
158
Delete
= 52,
159
Right
= 53,
160
Left
= 54,
161
Down
= 55,
162
Up
= 56,
163
PageUp
= 57,
164
PageDown
= 58,
165
Home
= 59,
166
End
= 60,
167
CapsLock
= 61,
168
ScrollLock
= 62,
169
NumLock
= 63,
170
PrintScreen
= 64,
171
Pause
= 65,
172
LeftShift
= 66,
173
LeftControl
= 67,
174
LeftAlt
= 68,
175
LeftSuper
= 69,
176
RightShift
= 70,
177
RightControl
= 71,
178
RightAlt
= 72,
179
RightSuper
= 73,
180
Menu
= 74,
181
F1
= 81,
182
F2
= 82,
183
F3
= 83,
184
F4
= 84,
185
F5
= 85,
186
F6
= 86,
187
F7
= 87,
188
F8
= 88,
189
F9
= 89,
190
F10
= 80,
191
F11
= 91,
192
F12
= 92,
193
Unknown
= 0xffffffff
194
};
195
200
enum class
InputJoystickButton
:
uint32
{
201
Button0
= 0,
202
Button1
= 1,
203
Button2
= 2,
204
Button3
= 3,
205
Button4
= 4,
206
Button5
= 5,
207
Button6
= 6,
208
Button7
= 7,
209
Button8
= 8,
210
Button9
= 9,
211
Button10
= 10,
212
Button11
= 11,
213
Button12
= 12,
214
Button13
= 13,
215
Button14
= 14,
216
Button15
= 15,
217
Button16
= 16,
218
Button17
= 17,
219
Unknown
= 0xffffffff
220
};
221
226
enum class
InputJoystickAxis
:
uint32
{
227
Axis0
= 0,
228
Axis1
= 1,
229
Axis2
= 2,
230
Axis3
= 3,
231
Axis4
= 4,
232
Axis5
= 5,
233
Unknown
= 0xffffffff
234
};
235
240
BRK_NS_END
241
242
#endif
//BERSERK_INPUTDEFS_HPP
Config.hpp
BRK_NS_END
#define BRK_NS_END
Definition:
Config.hpp:48
Mask.hpp
Typedefs.hpp
uint32
std::uint32_t uint32
Definition:
Typedefs.hpp:44
InputAction
Default actions, which occur for basic input device interaction.
InputDeviceState
State of the input device (used primary for joysticks)
InputJoystickAxis
Joystick axis id.
InputJoystickButton
Joystick button name.
InputKeyboardKey
Keyboard device keys.
InputModifier
Special keys modifiers (used as bit-vector)
InputModifiers
Input modifies mask (as a set of bits)
InputMouseButton
Mouse device buttons.
Mask< InputModifier, 5 >
InputModifier::Shift
@ Shift
InputModifier::CapsLock
@ CapsLock
InputModifier::Control
@ Control
InputModifier::Alt
@ Alt
InputModifier::NumLock
@ NumLock
InputKeyboardKey::Escape
@ Escape
InputKeyboardKey::X
@ X
InputKeyboardKey::Num6
@ Num6
InputKeyboardKey::Down
@ Down
InputKeyboardKey::RightSuper
@ RightSuper
InputKeyboardKey::C
@ C
InputKeyboardKey::Pause
@ Pause
InputKeyboardKey::Period
@ Period
InputKeyboardKey::F6
@ F6
InputKeyboardKey::Z
@ Z
InputKeyboardKey::Up
@ Up
InputKeyboardKey::RightShift
@ RightShift
InputKeyboardKey::Slash
@ Slash
InputKeyboardKey::F5
@ F5
InputKeyboardKey::E
@ E
InputKeyboardKey::BackSlash
@ BackSlash
InputKeyboardKey::P
@ P
InputKeyboardKey::Minus
@ Minus
InputKeyboardKey::RightBracket
@ RightBracket
InputKeyboardKey::F7
@ F7
InputKeyboardKey::F8
@ F8
InputKeyboardKey::LeftBracket
@ LeftBracket
InputKeyboardKey::Num7
@ Num7
InputKeyboardKey::F3
@ F3
InputKeyboardKey::LeftSuper
@ LeftSuper
InputKeyboardKey::U
@ U
InputKeyboardKey::V
@ V
InputKeyboardKey::Y
@ Y
InputKeyboardKey::Comma
@ Comma
InputKeyboardKey::Tab
@ Tab
InputKeyboardKey::S
@ S
InputKeyboardKey::W
@ W
InputKeyboardKey::LeftControl
@ LeftControl
InputKeyboardKey::F11
@ F11
InputKeyboardKey::M
@ M
InputKeyboardKey::Num2
@ Num2
InputKeyboardKey::ScrollLock
@ ScrollLock
InputKeyboardKey::Num5
@ Num5
InputKeyboardKey::A
@ A
InputKeyboardKey::F
@ F
InputKeyboardKey::Num0
@ Num0
InputKeyboardKey::RightControl
@ RightControl
InputKeyboardKey::End
@ End
InputKeyboardKey::F9
@ F9
InputKeyboardKey::Num8
@ Num8
InputKeyboardKey::Home
@ Home
InputKeyboardKey::N
@ N
InputKeyboardKey::LeftAlt
@ LeftAlt
InputKeyboardKey::Semicolon
@ Semicolon
InputKeyboardKey::LeftShift
@ LeftShift
InputKeyboardKey::PageUp
@ PageUp
InputKeyboardKey::B
@ B
InputKeyboardKey::Num3
@ Num3
InputKeyboardKey::Insert
@ Insert
InputKeyboardKey::K
@ K
InputKeyboardKey::F10
@ F10
InputKeyboardKey::Menu
@ Menu
InputKeyboardKey::Apostrophe
@ Apostrophe
InputKeyboardKey::T
@ T
InputKeyboardKey::Num1
@ Num1
InputKeyboardKey::PrintScreen
@ PrintScreen
InputKeyboardKey::H
@ H
InputKeyboardKey::Backspace
@ Backspace
InputKeyboardKey::L
@ L
InputKeyboardKey::Space
@ Space
InputKeyboardKey::Num9
@ Num9
InputKeyboardKey::RightAlt
@ RightAlt
InputKeyboardKey::I
@ I
InputKeyboardKey::G
@ G
InputKeyboardKey::Num4
@ Num4
InputKeyboardKey::F1
@ F1
InputKeyboardKey::R
@ R
InputKeyboardKey::F4
@ F4
InputKeyboardKey::F12
@ F12
InputKeyboardKey::PageDown
@ PageDown
InputKeyboardKey::Q
@ Q
InputKeyboardKey::Enter
@ Enter
InputKeyboardKey::O
@ O
InputKeyboardKey::Delete
@ Delete
InputKeyboardKey::Equal
@ Equal
InputKeyboardKey::D
@ D
InputKeyboardKey::F2
@ F2
InputKeyboardKey::J
@ J
InputAction::Press
@ Press
InputAction::State
@ State
InputAction::Move
@ Move
InputAction::Repeat
@ Repeat
InputAction::Text
@ Text
InputAction::Release
@ Release
InputJoystickButton::Button13
@ Button13
InputJoystickButton::Button6
@ Button6
InputJoystickButton::Button10
@ Button10
InputJoystickButton::Button11
@ Button11
InputJoystickButton::Button8
@ Button8
InputJoystickButton::Button16
@ Button16
InputJoystickButton::Button1
@ Button1
InputJoystickButton::Button3
@ Button3
InputJoystickButton::Button4
@ Button4
InputJoystickButton::Button7
@ Button7
InputJoystickButton::Button15
@ Button15
InputJoystickButton::Button12
@ Button12
InputJoystickButton::Button0
@ Button0
InputJoystickButton::Button2
@ Button2
InputJoystickButton::Button17
@ Button17
InputJoystickButton::Button9
@ Button9
InputJoystickButton::Button14
@ Button14
InputJoystickButton::Button5
@ Button5
InputJoystickAxis::Axis2
@ Axis2
InputJoystickAxis::Axis4
@ Axis4
InputJoystickAxis::Axis1
@ Axis1
InputJoystickAxis::Axis5
@ Axis5
InputJoystickAxis::Axis0
@ Axis0
InputJoystickAxis::Axis3
@ Axis3
InputMouseButton::Right
@ Right
InputMouseButton::Left
@ Left
InputDeviceState::Connected
@ Connected
InputDeviceState::Unknown
@ Unknown
InputDeviceState::Disconnected
@ Disconnected
BRK_NS_BEGIN
Definition:
GLDevice.cpp:46
Generated by
1.9.1