Divide Framework
0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Input.h
Go to the documentation of this file.
1
/*
2
Copyright (c) 2018 DIVIDE-Studio
3
Copyright (c) 2009 Ionut Cava
4
5
This file is part of DIVIDE Framework.
6
7
Permission is hereby granted, free of charge, to any person obtaining a copy
8
of this software
9
and associated documentation files (the "Software"), to deal in the Software
10
without restriction,
11
including without limitation the rights to use, copy, modify, merge, publish,
12
distribute, sublicense,
13
and/or sell copies of the Software, and to permit persons to whom the
14
Software is furnished to do so,
15
subject to the following conditions:
16
17
The above copyright notice and this permission notice shall be included in
18
all copies or substantial portions of the Software.
19
20
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
IMPLIED,
22
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
23
PARTICULAR PURPOSE AND NONINFRINGEMENT.
24
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
25
DAMAGES OR OTHER LIABILITY,
26
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
27
IN CONNECTION WITH THE SOFTWARE
28
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
30
*/
31
32
#pragma once
33
#ifndef DVD_INPUT_H_
34
#define DVD_INPUT_H_
35
36
namespace
Divide
{
37
namespace
Input {
39
enum class
Joystick
:
U8
{
40
JOYSTICK_1
= 0,
41
JOYSTICK_2
= 1,
42
JOYSTICK_3
= 2,
43
JOYSTICK_4
= 3,
44
JOYSTICK_5
= 4,
45
JOYSTICK_6
= 5,
46
JOYSTICK_7
= 6,
47
JOYSTICK_8
= 7,
48
JOYSTICK_9
= 8,
49
JOYSTICK_10
= 9,
50
COUNT
51
};
52
53
enum class
JoystickElementType
:
U8
{
54
POV_MOVE
= 0,
55
AXIS_MOVE
,
56
BALL_MOVE
,
57
BUTTON_PRESS
,
58
JOY_ADD_REMOVE
,
59
JOY_REMAP
,
60
COUNT
61
};
62
63
enum class
JoystickPovDirection
:
U8
{
64
UP
=
toBit
(1),
65
DOWN
=
toBit
(2),
66
LEFT
=
toBit
(3),
67
RIGHT
=
toBit
(4),
68
CENTERED
=
toBit
(5)
69
};
70
71
struct
JoystickData
{
72
bool
_gamePad
=
false
;
73
I32
_deadZone
= 8000;
74
I32
_max
= 0;
75
union
76
{
77
U32
_data
= 0;
78
U16
_smallData
[2];
79
I32
_dataSigned
;
80
I16
_smallDataSigned
[2];
81
};
82
};
83
84
struct
JoystickElement
{
85
JoystickElementType
_type
=
JoystickElementType::COUNT
;
86
JoystickData
_data
;
//values
87
U8
_elementIndex
= 0u;
//item index on device
88
};
89
90
struct
MouseAxis
{
91
I32
abs
= 0;
92
I32
rel
= 0;
93
};
94
95
struct
MouseState
{
96
MouseAxis
X
,
Y
;
97
I32
VWheel
= -1;
98
I32
HWheel
= -1;
99
};
100
101
enum class
MouseButton
:
U8
{
102
MB_Left
= 0,
103
MB_Right
,
104
MB_Middle
,
105
MB_Button3
,
106
MB_Button4
,
107
MB_Button5
,
108
MB_Button6
,
109
MB_Button7
,
110
COUNT
111
};
112
113
enum class
KeyModifier
:
U16
{
114
LSHIFT
=
toBit
(1),
115
RSHIFT
=
toBit
(2),
116
LCTRL
=
toBit
(3),
117
RCTRL
=
toBit
(4),
118
LALT
=
toBit
(5),
119
RALT
=
toBit
(6),
120
LGUI
=
toBit
(7),
121
RGUI
=
toBit
(8),
122
NUM
=
toBit
(9),
123
CAPS
=
toBit
(10),
124
MODE
=
toBit
(11)
125
};
126
127
enum class
KeyCode
:
U8
128
{
129
KC_UNASSIGNED
= 0x00,
130
KC_ESCAPE
= 0x01,
131
KC_1
= 0x02,
132
KC_2
= 0x03,
133
KC_3
= 0x04,
134
KC_4
= 0x05,
135
KC_5
= 0x06,
136
KC_6
= 0x07,
137
KC_7
= 0x08,
138
KC_8
= 0x09,
139
KC_9
= 0x0A,
140
KC_0
= 0x0B,
141
KC_MINUS
= 0x0C,
// - on main keyboard
142
KC_EQUALS
= 0x0D,
143
KC_BACK
= 0x0E,
// backspace
144
KC_TAB
= 0x0F,
145
KC_Q
= 0x10,
146
KC_W
= 0x11,
147
KC_E
= 0x12,
148
KC_R
= 0x13,
149
KC_T
= 0x14,
150
KC_Y
= 0x15,
151
KC_U
= 0x16,
152
KC_I
= 0x17,
153
KC_O
= 0x18,
154
KC_P
= 0x19,
155
KC_LBRACKET
= 0x1A,
156
KC_RBRACKET
= 0x1B,
157
KC_RETURN
= 0x1C,
// Enter on main keyboard
158
KC_LCONTROL
= 0x1D,
159
KC_A
= 0x1E,
160
KC_S
= 0x1F,
161
KC_D
= 0x20,
162
KC_F
= 0x21,
163
KC_G
= 0x22,
164
KC_H
= 0x23,
165
KC_J
= 0x24,
166
KC_K
= 0x25,
167
KC_L
= 0x26,
168
KC_SEMICOLON
= 0x27,
169
KC_APOSTROPHE
= 0x28,
170
KC_GRAVE
= 0x29,
// accent
171
KC_LSHIFT
= 0x2A,
172
KC_BACKSLASH
= 0x2B,
173
KC_Z
= 0x2C,
174
KC_X
= 0x2D,
175
KC_C
= 0x2E,
176
KC_V
= 0x2F,
177
KC_B
= 0x30,
178
KC_N
= 0x31,
179
KC_M
= 0x32,
180
KC_COMMA
= 0x33,
181
KC_PERIOD
= 0x34,
// . on main keyboard
182
KC_SLASH
= 0x35,
// / on main keyboard
183
KC_RSHIFT
= 0x36,
184
KC_MULTIPLY
= 0x37,
// * on numeric keypad
185
KC_LMENU
= 0x38,
// left Alt
186
KC_SPACE
= 0x39,
187
KC_CAPITAL
= 0x3A,
188
KC_F1
= 0x3B,
189
KC_F2
= 0x3C,
190
KC_F3
= 0x3D,
191
KC_F4
= 0x3E,
192
KC_F5
= 0x3F,
193
KC_F6
= 0x40,
194
KC_F7
= 0x41,
195
KC_F8
= 0x42,
196
KC_F9
= 0x43,
197
KC_F10
= 0x44,
198
KC_NUMLOCK
= 0x45,
199
KC_SCROLL
= 0x46,
// Scroll Lock
200
KC_NUMPAD7
= 0x47,
201
KC_NUMPAD8
= 0x48,
202
KC_NUMPAD9
= 0x49,
203
KC_SUBTRACT
= 0x4A,
// - on numeric keypad
204
KC_NUMPAD4
= 0x4B,
205
KC_NUMPAD5
= 0x4C,
206
KC_NUMPAD6
= 0x4D,
207
KC_ADD
= 0x4E,
// + on numeric keypad
208
KC_NUMPAD1
= 0x4F,
209
KC_NUMPAD2
= 0x50,
210
KC_NUMPAD3
= 0x51,
211
KC_NUMPAD0
= 0x52,
212
KC_DECIMAL
= 0x53,
// . on numeric keypad
213
KC_OEM_102
= 0x56,
// < > | on UK/Germany keyboards
214
KC_F11
= 0x57,
215
KC_F12
= 0x58,
216
KC_F13
= 0x64,
// (NEC PC98)
217
KC_F14
= 0x65,
// (NEC PC98)
218
KC_F15
= 0x66,
// (NEC PC98)
219
KC_KANA
= 0x70,
// (Japanese keyboard)
220
KC_ABNT_C1
= 0x73,
// / ? on Portugese (Brazilian) keyboards
221
KC_CONVERT
= 0x79,
// (Japanese keyboard)
222
KC_NOCONVERT
= 0x7B,
// (Japanese keyboard)
223
KC_YEN
= 0x7D,
// (Japanese keyboard)
224
KC_ABNT_C2
= 0x7E,
// Numpad . on Portugese (Brazilian) keyboards
225
KC_NUMPADEQUALS
= 0x8D,
// = on numeric keypad (NEC PC98)
226
KC_PREVTRACK
= 0x90,
// Previous Track (KC_CIRCUMFLEX on Japanese keyboard)
227
KC_AT
= 0x91,
// (NEC PC98)
228
KC_COLON
= 0x92,
// (NEC PC98)
229
KC_UNDERLINE
= 0x93,
// (NEC PC98)
230
KC_KANJI
= 0x94,
// (Japanese keyboard)
231
KC_STOP
= 0x95,
// (NEC PC98)
232
KC_AX
= 0x96,
// (Japan AX)
233
KC_UNLABELED
= 0x97,
// (J3100)
234
KC_NEXTTRACK
= 0x99,
// Next Track
235
KC_NUMPADENTER
= 0x9C,
// Enter on numeric keypad
236
KC_RCONTROL
= 0x9D,
237
KC_MUTE
= 0xA0,
// Mute
238
KC_CALCULATOR
= 0xA1,
// Calculator
239
KC_PLAYPAUSE
= 0xA2,
// Play / Pause
240
KC_MEDIASTOP
= 0xA4,
// Media Stop
241
KC_TWOSUPERIOR
= 0xAA,
// ² on French AZERTY keyboard (same place as ~ ` on QWERTY)
242
KC_VOLUMEDOWN
= 0xAE,
// Volume -
243
KC_VOLUMEUP
= 0xB0,
// Volume +
244
KC_WEBHOME
= 0xB2,
// Web home
245
KC_NUMPADCOMMA
= 0xB3,
// , on numeric keypad (NEC PC98)
246
KC_DIVIDE
= 0xB5,
// / on numeric keypad
247
KC_SYSRQ
= 0xB7,
248
KC_RMENU
= 0xB8,
// right Alt
249
KC_PAUSE
= 0xC5,
// Pause
250
KC_HOME
= 0xC7,
// Home on arrow keypad
251
KC_UP
= 0xC8,
// UpArrow on arrow keypad
252
KC_PGUP
= 0xC9,
// PgUp on arrow keypad
253
KC_LEFT
= 0xCB,
// LeftArrow on arrow keypad
254
KC_RIGHT
= 0xCD,
// RightArrow on arrow keypad
255
KC_END
= 0xCF,
// End on arrow keypad
256
KC_DOWN
= 0xD0,
// DownArrow on arrow keypad
257
KC_PGDOWN
= 0xD1,
// PgDn on arrow keypad
258
KC_INSERT
= 0xD2,
// Insert on arrow keypad
259
KC_DELETE
= 0xD3,
// Delete on arrow keypad
260
KC_LWIN
= 0xDB,
// Left Windows key
261
KC_RWIN
= 0xDC,
// Right Windows key
262
KC_APPS
= 0xDD,
// AppMenu key
263
KC_POWER
= 0xDE,
// System Power
264
KC_SLEEP
= 0xDF,
// System Sleep
265
KC_WAKE
= 0xE3,
// System Wake
266
KC_WEBSEARCH
= 0xE5,
// Web Search
267
KC_WEBFAVORITES
= 0xE6,
// Web Favorites
268
KC_WEBREFRESH
= 0xE7,
// Web Refresh
269
KC_WEBSTOP
= 0xE8,
// Web Stop
270
KC_WEBFORWARD
= 0xE9,
// Web Forward
271
KC_WEBBACK
= 0xEA,
// Web Back
272
KC_MYCOMPUTER
= 0xEB,
// My Computer
273
KC_MAIL
= 0xEC,
// Mail
274
KC_MEDIASELECT
= 0xED,
// Media Select
275
KC_PRINTSCREEN
= 0xEE,
// Print Screen
276
};
277
278
enum class
InputState
:
U8
{
279
PRESSED
= 0,
280
RELEASED
,
281
COUNT
282
};
283
284
SDL_Keycode
SDLKeyCodeFromKey
(
KeyCode
code)
noexcept
;
285
KeyCode
KeyCodeFromSDLKey
(SDL_Keycode code)
noexcept
;
286
287
KeyCode
KeyCodeByName
(
const
char
* keyName)
noexcept
;
288
MouseButton
mouseButtonByName
(
const
string
& buttonName);
289
JoystickElement
joystickElementByName
(
const
string
& elementName);
290
291
InputState
GetKeyState
(
U8
deviceIndex,
KeyCode
key)
noexcept
;
292
InputState
GetMouseButtonState
(
U8
deviceIndex,
MouseButton
button)
noexcept
;
293
InputState
GetJoystickElementState
(
Joystick
deviceIndex, JoystickElement element)
noexcept
;
294
295
};
//namespace Input
296
};
//namespace Divide
297
#endif
//DVD_INPUT_H_
Divide::Input::KeyModifier
KeyModifier
Definition:
Input.h:113
Divide::Input::KeyModifier::RCTRL
@ RCTRL
Divide::Input::KeyModifier::LGUI
@ LGUI
Divide::Input::KeyModifier::NUM
@ NUM
Divide::Input::KeyModifier::RGUI
@ RGUI
Divide::Input::KeyModifier::CAPS
@ CAPS
Divide::Input::KeyModifier::LCTRL
@ LCTRL
Divide::Input::KeyModifier::MODE
@ MODE
Divide::Input::KeyModifier::LALT
@ LALT
Divide::Input::KeyModifier::RSHIFT
@ RSHIFT
Divide::Input::KeyModifier::RALT
@ RALT
Divide::Input::KeyModifier::LSHIFT
@ LSHIFT
Divide::Input::SDLKeyCodeFromKey
SDL_Keycode SDLKeyCodeFromKey(KeyCode code) noexcept
Definition:
Input.cpp:126
Divide::Input::InputState
InputState
Definition:
Input.h:278
Divide::Input::InputState::RELEASED
@ RELEASED
Divide::Input::InputState::PRESSED
@ PRESSED
Divide::Input::JoystickElementType
JoystickElementType
Definition:
Input.h:53
Divide::Input::JoystickElementType::BUTTON_PRESS
@ BUTTON_PRESS
Divide::Input::JoystickElementType::COUNT
@ COUNT
Divide::Input::JoystickElementType::POV_MOVE
@ POV_MOVE
Divide::Input::JoystickElementType::JOY_ADD_REMOVE
@ JOY_ADD_REMOVE
Divide::Input::JoystickElementType::AXIS_MOVE
@ AXIS_MOVE
Divide::Input::JoystickElementType::BALL_MOVE
@ BALL_MOVE
Divide::Input::JoystickElementType::JOY_REMAP
@ JOY_REMAP
Divide::Input::GetJoystickElementState
InputState GetJoystickElementState(Joystick deviceIndex, JoystickElement element) noexcept
Definition:
Input.cpp:188
Divide::Input::Joystick
Joystick
Points to the position of said joystick in the vector.
Definition:
Input.h:39
Divide::Input::Joystick::JOYSTICK_10
@ JOYSTICK_10
Divide::Input::Joystick::JOYSTICK_2
@ JOYSTICK_2
Divide::Input::Joystick::JOYSTICK_5
@ JOYSTICK_5
Divide::Input::Joystick::COUNT
@ COUNT
Divide::Input::Joystick::JOYSTICK_9
@ JOYSTICK_9
Divide::Input::Joystick::JOYSTICK_3
@ JOYSTICK_3
Divide::Input::Joystick::JOYSTICK_1
@ JOYSTICK_1
Divide::Input::Joystick::JOYSTICK_4
@ JOYSTICK_4
Divide::Input::Joystick::JOYSTICK_8
@ JOYSTICK_8
Divide::Input::Joystick::JOYSTICK_6
@ JOYSTICK_6
Divide::Input::Joystick::JOYSTICK_7
@ JOYSTICK_7
Divide::Input::mouseButtonByName
MouseButton mouseButtonByName(const string &buttonName)
Definition:
InputAggregatorInterface.cpp:10
Divide::Input::joystickElementByName
JoystickElement joystickElementByName(const string &elementName)
Definition:
InputAggregatorInterface.cpp:30
Divide::Input::KeyCode
KeyCode
Definition:
Input.h:128
Divide::Input::KeyCode::KC_4
@ KC_4
Divide::Input::KeyCode::KC_F8
@ KC_F8
Divide::Input::KeyCode::KC_APOSTROPHE
@ KC_APOSTROPHE
Divide::Input::KeyCode::KC_F14
@ KC_F14
Divide::Input::KeyCode::KC_A
@ KC_A
Divide::Input::KeyCode::KC_7
@ KC_7
Divide::Input::KeyCode::KC_R
@ KC_R
Divide::Input::KeyCode::KC_3
@ KC_3
Divide::Input::KeyCode::KC_TWOSUPERIOR
@ KC_TWOSUPERIOR
Divide::Input::KeyCode::KC_BACKSLASH
@ KC_BACKSLASH
Divide::Input::KeyCode::KC_G
@ KC_G
Divide::Input::KeyCode::KC_F4
@ KC_F4
Divide::Input::KeyCode::KC_WEBSTOP
@ KC_WEBSTOP
Divide::Input::KeyCode::KC_M
@ KC_M
Divide::Input::KeyCode::KC_PLAYPAUSE
@ KC_PLAYPAUSE
Divide::Input::KeyCode::KC_SPACE
@ KC_SPACE
Divide::Input::KeyCode::KC_COLON
@ KC_COLON
Divide::Input::KeyCode::KC_PRINTSCREEN
@ KC_PRINTSCREEN
Divide::Input::KeyCode::KC_INSERT
@ KC_INSERT
Divide::Input::KeyCode::KC_NUMPADEQUALS
@ KC_NUMPADEQUALS
Divide::Input::KeyCode::KC_WEBSEARCH
@ KC_WEBSEARCH
Divide::Input::KeyCode::KC_PGDOWN
@ KC_PGDOWN
Divide::Input::KeyCode::KC_X
@ KC_X
Divide::Input::KeyCode::KC_CALCULATOR
@ KC_CALCULATOR
Divide::Input::KeyCode::KC_MULTIPLY
@ KC_MULTIPLY
Divide::Input::KeyCode::KC_5
@ KC_5
Divide::Input::KeyCode::KC_F10
@ KC_F10
Divide::Input::KeyCode::KC_2
@ KC_2
Divide::Input::KeyCode::KC_YEN
@ KC_YEN
Divide::Input::KeyCode::KC_END
@ KC_END
Divide::Input::KeyCode::KC_F15
@ KC_F15
Divide::Input::KeyCode::KC_Z
@ KC_Z
Divide::Input::KeyCode::KC_NUMPAD8
@ KC_NUMPAD8
Divide::Input::KeyCode::KC_WEBREFRESH
@ KC_WEBREFRESH
Divide::Input::KeyCode::KC_F3
@ KC_F3
Divide::Input::KeyCode::KC_STOP
@ KC_STOP
Divide::Input::KeyCode::KC_WEBHOME
@ KC_WEBHOME
Divide::Input::KeyCode::KC_MAIL
@ KC_MAIL
Divide::Input::KeyCode::KC_ADD
@ KC_ADD
Divide::Input::KeyCode::KC_RIGHT
@ KC_RIGHT
Divide::Input::KeyCode::KC_F6
@ KC_F6
Divide::Input::KeyCode::KC_NUMPAD9
@ KC_NUMPAD9
Divide::Input::KeyCode::KC_8
@ KC_8
Divide::Input::KeyCode::KC_AX
@ KC_AX
Divide::Input::KeyCode::KC_ESCAPE
@ KC_ESCAPE
Divide::Input::KeyCode::KC_RMENU
@ KC_RMENU
Divide::Input::KeyCode::KC_SEMICOLON
@ KC_SEMICOLON
Divide::Input::KeyCode::KC_MEDIASELECT
@ KC_MEDIASELECT
Divide::Input::KeyCode::KC_RETURN
@ KC_RETURN
Divide::Input::KeyCode::KC_L
@ KC_L
Divide::Input::KeyCode::KC_NUMPAD4
@ KC_NUMPAD4
Divide::Input::KeyCode::KC_MINUS
@ KC_MINUS
Divide::Input::KeyCode::KC_F2
@ KC_F2
Divide::Input::KeyCode::KC_W
@ KC_W
Divide::Input::KeyCode::KC_NUMLOCK
@ KC_NUMLOCK
Divide::Input::KeyCode::KC_F11
@ KC_F11
Divide::Input::KeyCode::KC_T
@ KC_T
Divide::Input::KeyCode::KC_J
@ KC_J
Divide::Input::KeyCode::KC_NEXTTRACK
@ KC_NEXTTRACK
Divide::Input::KeyCode::KC_EQUALS
@ KC_EQUALS
Divide::Input::KeyCode::KC_BACK
@ KC_BACK
Divide::Input::KeyCode::KC_WEBFORWARD
@ KC_WEBFORWARD
Divide::Input::KeyCode::KC_ABNT_C1
@ KC_ABNT_C1
Divide::Input::KeyCode::KC_UNDERLINE
@ KC_UNDERLINE
Divide::Input::KeyCode::KC_H
@ KC_H
Divide::Input::KeyCode::KC_AT
@ KC_AT
Divide::Input::KeyCode::KC_P
@ KC_P
Divide::Input::KeyCode::KC_F12
@ KC_F12
Divide::Input::KeyCode::KC_SLEEP
@ KC_SLEEP
Divide::Input::KeyCode::KC_C
@ KC_C
Divide::Input::KeyCode::KC_OEM_102
@ KC_OEM_102
Divide::Input::KeyCode::KC_O
@ KC_O
Divide::Input::KeyCode::KC_NUMPADCOMMA
@ KC_NUMPADCOMMA
Divide::Input::KeyCode::KC_VOLUMEUP
@ KC_VOLUMEUP
Divide::Input::KeyCode::KC_LSHIFT
@ KC_LSHIFT
Divide::Input::KeyCode::KC_WAKE
@ KC_WAKE
Divide::Input::KeyCode::KC_6
@ KC_6
Divide::Input::KeyCode::KC_Y
@ KC_Y
Divide::Input::KeyCode::KC_UNLABELED
@ KC_UNLABELED
Divide::Input::KeyCode::KC_LBRACKET
@ KC_LBRACKET
Divide::Input::KeyCode::KC_1
@ KC_1
Divide::Input::KeyCode::KC_V
@ KC_V
Divide::Input::KeyCode::KC_APPS
@ KC_APPS
Divide::Input::KeyCode::KC_KANJI
@ KC_KANJI
Divide::Input::KeyCode::KC_NUMPAD5
@ KC_NUMPAD5
Divide::Input::KeyCode::KC_UNASSIGNED
@ KC_UNASSIGNED
Divide::Input::KeyCode::KC_NUMPAD1
@ KC_NUMPAD1
Divide::Input::KeyCode::KC_DELETE
@ KC_DELETE
Divide::Input::KeyCode::KC_SYSRQ
@ KC_SYSRQ
Divide::Input::KeyCode::KC_F13
@ KC_F13
Divide::Input::KeyCode::KC_DOWN
@ KC_DOWN
Divide::Input::KeyCode::KC_N
@ KC_N
Divide::Input::KeyCode::KC_LCONTROL
@ KC_LCONTROL
Divide::Input::KeyCode::KC_U
@ KC_U
Divide::Input::KeyCode::KC_GRAVE
@ KC_GRAVE
Divide::Input::KeyCode::KC_MUTE
@ KC_MUTE
Divide::Input::KeyCode::KC_LWIN
@ KC_LWIN
Divide::Input::KeyCode::KC_SUBTRACT
@ KC_SUBTRACT
Divide::Input::KeyCode::KC_NUMPAD6
@ KC_NUMPAD6
Divide::Input::KeyCode::KC_WEBBACK
@ KC_WEBBACK
Divide::Input::KeyCode::KC_NOCONVERT
@ KC_NOCONVERT
Divide::Input::KeyCode::KC_LMENU
@ KC_LMENU
Divide::Input::KeyCode::KC_SLASH
@ KC_SLASH
Divide::Input::KeyCode::KC_B
@ KC_B
Divide::Input::KeyCode::KC_NUMPAD2
@ KC_NUMPAD2
Divide::Input::KeyCode::KC_NUMPAD0
@ KC_NUMPAD0
Divide::Input::KeyCode::KC_0
@ KC_0
Divide::Input::KeyCode::KC_MYCOMPUTER
@ KC_MYCOMPUTER
Divide::Input::KeyCode::KC_DECIMAL
@ KC_DECIMAL
Divide::Input::KeyCode::KC_F9
@ KC_F9
Divide::Input::KeyCode::KC_NUMPAD7
@ KC_NUMPAD7
Divide::Input::KeyCode::KC_PREVTRACK
@ KC_PREVTRACK
Divide::Input::KeyCode::KC_F1
@ KC_F1
Divide::Input::KeyCode::KC_PERIOD
@ KC_PERIOD
Divide::Input::KeyCode::KC_D
@ KC_D
Divide::Input::KeyCode::KC_RSHIFT
@ KC_RSHIFT
Divide::Input::KeyCode::KC_SCROLL
@ KC_SCROLL
Divide::Input::KeyCode::KC_9
@ KC_9
Divide::Input::KeyCode::KC_E
@ KC_E
Divide::Input::KeyCode::KC_CAPITAL
@ KC_CAPITAL
Divide::Input::KeyCode::KC_F
@ KC_F
Divide::Input::KeyCode::KC_DIVIDE
@ KC_DIVIDE
Divide::Input::KeyCode::KC_TAB
@ KC_TAB
Divide::Input::KeyCode::KC_RBRACKET
@ KC_RBRACKET
Divide::Input::KeyCode::KC_ABNT_C2
@ KC_ABNT_C2
Divide::Input::KeyCode::KC_MEDIASTOP
@ KC_MEDIASTOP
Divide::Input::KeyCode::KC_POWER
@ KC_POWER
Divide::Input::KeyCode::KC_S
@ KC_S
Divide::Input::KeyCode::KC_PAUSE
@ KC_PAUSE
Divide::Input::KeyCode::KC_KANA
@ KC_KANA
Divide::Input::KeyCode::KC_NUMPAD3
@ KC_NUMPAD3
Divide::Input::KeyCode::KC_F7
@ KC_F7
Divide::Input::KeyCode::KC_CONVERT
@ KC_CONVERT
Divide::Input::KeyCode::KC_HOME
@ KC_HOME
Divide::Input::KeyCode::KC_I
@ KC_I
Divide::Input::KeyCode::KC_RCONTROL
@ KC_RCONTROL
Divide::Input::KeyCode::KC_LEFT
@ KC_LEFT
Divide::Input::KeyCode::KC_UP
@ KC_UP
Divide::Input::KeyCode::KC_Q
@ KC_Q
Divide::Input::KeyCode::KC_RWIN
@ KC_RWIN
Divide::Input::KeyCode::KC_K
@ KC_K
Divide::Input::KeyCode::KC_F5
@ KC_F5
Divide::Input::KeyCode::KC_PGUP
@ KC_PGUP
Divide::Input::KeyCode::KC_NUMPADENTER
@ KC_NUMPADENTER
Divide::Input::KeyCode::KC_COMMA
@ KC_COMMA
Divide::Input::KeyCode::KC_VOLUMEDOWN
@ KC_VOLUMEDOWN
Divide::Input::KeyCode::KC_WEBFAVORITES
@ KC_WEBFAVORITES
Divide::Input::GetKeyState
InputState GetKeyState(U8 deviceIndex, KeyCode key) noexcept
Definition:
Input.cpp:150
Divide::Input::KeyCodeFromSDLKey
KeyCode KeyCodeFromSDLKey(SDL_Keycode code) noexcept
Definition:
Input.cpp:136
Divide::Input::MouseButton
MouseButton
Definition:
Input.h:101
Divide::Input::MouseButton::MB_Button5
@ MB_Button5
Divide::Input::MouseButton::MB_Button4
@ MB_Button4
Divide::Input::MouseButton::MB_Button7
@ MB_Button7
Divide::Input::MouseButton::MB_Middle
@ MB_Middle
Divide::Input::MouseButton::MB_Button3
@ MB_Button3
Divide::Input::MouseButton::MB_Right
@ MB_Right
Divide::Input::MouseButton::MB_Left
@ MB_Left
Divide::Input::MouseButton::MB_Button6
@ MB_Button6
Divide::Input::GetMouseButtonState
InputState GetMouseButtonState(U8 deviceIndex, MouseButton button) noexcept
Definition:
Input.cpp:157
Divide::Input::JoystickPovDirection
JoystickPovDirection
Definition:
Input.h:63
Divide::Input::JoystickPovDirection::RIGHT
@ RIGHT
Divide::Input::JoystickPovDirection::CENTERED
@ CENTERED
Divide::Input::JoystickPovDirection::LEFT
@ LEFT
Divide::Input::JoystickPovDirection::DOWN
@ DOWN
Divide::Input::JoystickPovDirection::UP
@ UP
Divide::Input::KeyCodeByName
KeyCode KeyCodeByName(const char *keyName) noexcept
Definition:
Input.cpp:146
Divide
Handle console commands that start with a forward slash.
Definition:
AIProcessor.cpp:7
Divide::I32
int32_t I32
Definition:
PlatformDataTypes.h:50
Divide::U8
uint8_t U8
Definition:
PlatformDataTypes.h:44
Divide::I16
int16_t I16
Definition:
PlatformDataTypes.h:49
Divide::U16
uint16_t U16
Definition:
PlatformDataTypes.h:45
Divide::U32
uint32_t U32
Definition:
PlatformDataTypes.h:46
Divide::toBit
constexpr T toBit(const T X)
Converts an arbitrary positive integer value to a bitwise value used for masks.
Definition:
PlatformDefines.h:237
Divide::Input::JoystickData
Definition:
Input.h:71
Divide::Input::JoystickData::_smallDataSigned
I16 _smallDataSigned[2]
Definition:
Input.h:80
Divide::Input::JoystickData::_smallData
U16 _smallData[2]
Definition:
Input.h:78
Divide::Input::JoystickData::_max
I32 _max
Definition:
Input.h:74
Divide::Input::JoystickData::_data
U32 _data
Definition:
Input.h:77
Divide::Input::JoystickData::_deadZone
I32 _deadZone
Definition:
Input.h:73
Divide::Input::JoystickData::_dataSigned
I32 _dataSigned
Definition:
Input.h:79
Divide::Input::JoystickData::_gamePad
bool _gamePad
Definition:
Input.h:72
Divide::Input::JoystickElement
Definition:
Input.h:84
Divide::Input::JoystickElement::_type
JoystickElementType _type
Definition:
Input.h:85
Divide::Input::JoystickElement::_elementIndex
U8 _elementIndex
Definition:
Input.h:87
Divide::Input::JoystickElement::_data
JoystickData _data
Definition:
Input.h:86
Divide::Input::MouseAxis
Definition:
Input.h:90
Divide::Input::MouseAxis::abs
I32 abs
Definition:
Input.h:91
Divide::Input::MouseAxis::rel
I32 rel
Definition:
Input.h:92
Divide::Input::MouseState
Definition:
Input.h:95
Divide::Input::MouseState::Y
MouseAxis Y
Definition:
Input.h:96
Divide::Input::MouseState::HWheel
I32 HWheel
Definition:
Input.h:98
Divide::Input::MouseState::VWheel
I32 VWheel
Definition:
Input.h:97
Divide::Input::MouseState::X
MouseAxis X
Definition:
Input.h:96
Source
Platform
Input
Headers
Input.h
Generated on Fri May 17 2024 16:59:54 for Divide Framework by
1.9.6