Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SDL2Keyboard.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <SDL.h>
4 #include <include/cef_base.h>
5 #include <stdint.h> // for uint16_t
6 
7 #include "SDL_keycode.h" // for SDL_Keycode
8 
9 extern int getKeyboardModifiers(uint16_t const mod);
10 
11 extern uint16_t convertSDLtoJSKeyCode(SDL_Keycode sdl_keycode, bool shift = false, bool numlock = false);
12 
14 enum {
16  JSK_TAB = 9,
18  JSK_ENTER = 13,
19  JSK_SHIFT = 16,
20  JSK_CTRL = 17,
22  JSK_PAUSE = 19,
24  JSK_ESCAPE = 27,
25  JSK_SPACE = 32,
28  JSK_END = 35,
29  JSK_HOME = 36,
34  JSK_INSERT = 45,
35  JSK_DELETE = 46,
36  JSK_0 = 48,
37  JSK_1 = 49,
38  JSK_2 = 50,
39  JSK_3 = 51,
40  JSK_4 = 52,
41  JSK_5 = 53,
42  JSK_6 = 54,
43  JSK_7 = 55,
44  JSK_8 = 56,
45  JSK_9 = 57,
46  JSK_A = 65,
47  JSK_B = 66,
48  JSK_C = 67,
49  JSK_D = 68,
50  JSK_E = 69,
51  JSK_F = 70,
52  JSK_G = 71,
53  JSK_H = 72,
54  JSK_I = 73,
55  JSK_J = 74,
56  JSK_K = 75,
57  JSK_L = 76,
58  JSK_M = 77,
59  JSK_N = 78,
60  JSK_O = 79,
61  JSK_P = 80,
62  JSK_Q = 81,
63  JSK_R = 82,
64  JSK_S = 83,
65  JSK_T = 84,
66  JSK_U = 85,
67  JSK_V = 86,
68  JSK_W = 87,
69  JSK_X = 88,
70  JSK_Y = 89,
71  JSK_Z = 90,
74  JSK_SELECT = 93,
75  JSK_NUM_0 = 96,
76  JSK_NUM_1 = 97,
77  JSK_NUM_2 = 98,
78  JSK_NUM_3 = 99,
79  JSK_NUM_4 = 100,
80  JSK_NUM_5 = 101,
81  JSK_NUM_6 = 102,
82  JSK_NUM_7 = 103,
83  JSK_NUM_8 = 104,
84  JSK_NUM_9 = 105,
85  JSK_MULTIPLY = 106,
86  JSK_ADD = 107,
88  JSK_SUBTRACT = 109,
90  JSK_DIVIDE = 111,
91  JSK_F1 = 112,
92  JSK_F2 = 113,
93  JSK_F3 = 114,
94  JSK_F4 = 115,
95  JSK_F5 = 116,
96  JSK_F6 = 117,
97  JSK_F7 = 118,
98  JSK_F8 = 119,
99  JSK_F9 = 120,
100  JSK_F10 = 121,
101  JSK_F11 = 122,
102  JSK_F12 = 123,
103 
105  JSC_PIPE = 124,
107  JSC_TILDE = 126,
108  JSC_DELETE = 127,
109 
112 
115  JSK_COMMA = 188,
116  JSK_DASH = 189,
117  JSK_PERIOD = 190,
120 
126 
128  JSC_HASH = 35,
137  JSC_PLUS = 43,
139  JSC_COMMA = 44,
142  JSC_SLASH = 47,
146  JSC_EQUAL = 61,
152 };
Definition: SDL2Keyboard.hpp:96
Definition: SDL2Keyboard.hpp:56
Definition: SDL2Keyboard.hpp:39
Definition: SDL2Keyboard.hpp:26
Definition: SDL2Keyboard.hpp:34
Definition: SDL2Keyboard.hpp:61
Definition: SDL2Keyboard.hpp:76
Definition: SDL2Keyboard.hpp:43
Definition: SDL2Keyboard.hpp:27
Definition: SDL2Keyboard.hpp:50
Definition: SDL2Keyboard.hpp:150
Definition: SDL2Keyboard.hpp:21
Definition: SDL2Keyboard.hpp:92
Definition: SDL2Keyboard.hpp:84
Definition: SDL2Keyboard.hpp:74
Definition: SDL2Keyboard.hpp:129
Definition: SDL2Keyboard.hpp:149
Definition: SDL2Keyboard.hpp:35
Definition: SDL2Keyboard.hpp:110
Definition: SDL2Keyboard.hpp:71
Definition: SDL2Keyboard.hpp:132
Definition: SDL2Keyboard.hpp:125
Definition: SDL2Keyboard.hpp:75
Definition: SDL2Keyboard.hpp:95
Definition: SDL2Keyboard.hpp:124
Definition: SDL2Keyboard.hpp:142
Definition: SDL2Keyboard.hpp:31
Definition: SDL2Keyboard.hpp:69
Definition: SDL2Keyboard.hpp:40
Definition: SDL2Keyboard.hpp:66
Definition: SDL2Keyboard.hpp:108
Definition: SDL2Keyboard.hpp:59
Definition: SDL2Keyboard.hpp:93
Definition: SDL2Keyboard.hpp:73
Definition: SDL2Keyboard.hpp:130
Definition: SDL2Keyboard.hpp:104
Definition: SDL2Keyboard.hpp:134
Definition: SDL2Keyboard.hpp:117
Definition: SDL2Keyboard.hpp:80
Definition: SDL2Keyboard.hpp:65
Definition: SDL2Keyboard.hpp:42
Definition: SDL2Keyboard.hpp:144
Definition: SDL2Keyboard.hpp:137
Definition: SDL2Keyboard.hpp:52
Definition: SDL2Keyboard.hpp:140
Definition: SDL2Keyboard.hpp:38
uint16_t convertSDLtoJSKeyCode(SDL_Keycode sdl_keycode, bool shift=false, bool numlock=false)
Definition: SDL2Keyboard.cpp:23
Definition: SDL2Keyboard.hpp:53
Definition: SDL2Keyboard.hpp:41
Definition: SDL2Keyboard.hpp:128
Definition: SDL2Keyboard.hpp:87
Definition: SDL2Keyboard.hpp:22
Definition: SDL2Keyboard.hpp:17
Definition: SDL2Keyboard.hpp:77
Definition: SDL2Keyboard.hpp:121
Definition: SDL2Keyboard.hpp:36
Definition: SDL2Keyboard.hpp:55
Definition: SDL2Keyboard.hpp:102
Definition: SDL2Keyboard.hpp:67
Definition: SDL2Keyboard.hpp:135
Definition: SDL2Keyboard.hpp:114
Definition: SDL2Keyboard.hpp:79
Definition: SDL2Keyboard.hpp:82
Definition: SDL2Keyboard.hpp:18
Definition: SDL2Keyboard.hpp:151
Definition: SDL2Keyboard.hpp:97
Definition: SDL2Keyboard.hpp:105
Definition: SDL2Keyboard.hpp:138
Definition: SDL2Keyboard.hpp:64
Definition: SDL2Keyboard.hpp:100
Definition: SDL2Keyboard.hpp:45
Definition: SDL2Keyboard.hpp:98
Definition: SDL2Keyboard.hpp:99
Definition: SDL2Keyboard.hpp:47
int getKeyboardModifiers(uint16_t const mod)
Definition: SDL2Keyboard.cpp:5
Definition: SDL2Keyboard.hpp:122
Definition: SDL2Keyboard.hpp:118
Definition: SDL2Keyboard.hpp:148
Definition: SDL2Keyboard.hpp:20
Definition: SDL2Keyboard.hpp:29
Definition: SDL2Keyboard.hpp:46
Definition: SDL2Keyboard.hpp:15
Definition: SDL2Keyboard.hpp:48
Definition: SDL2Keyboard.hpp:37
Definition: SDL2Keyboard.hpp:72
Definition: SDL2Keyboard.hpp:58
Definition: SDL2Keyboard.hpp:63
Definition: SDL2Keyboard.hpp:94
Definition: SDL2Keyboard.hpp:24
Definition: SDL2Keyboard.hpp:86
Definition: SDL2Keyboard.hpp:116
Definition: SDL2Keyboard.hpp:91
Definition: SDL2Keyboard.hpp:23
Definition: SDL2Keyboard.hpp:111
Definition: SDL2Keyboard.hpp:49
Definition: SDL2Keyboard.hpp:89
Definition: SDL2Keyboard.hpp:30
Definition: SDL2Keyboard.hpp:113
Definition: SDL2Keyboard.hpp:145
Definition: SDL2Keyboard.hpp:143
Definition: SDL2Keyboard.hpp:119
Definition: SDL2Keyboard.hpp:25
Definition: SDL2Keyboard.hpp:81
Definition: SDL2Keyboard.hpp:90
Definition: SDL2Keyboard.hpp:70
Definition: SDL2Keyboard.hpp:57
Definition: SDL2Keyboard.hpp:88
Definition: SDL2Keyboard.hpp:16
Definition: SDL2Keyboard.hpp:123
Definition: SDL2Keyboard.hpp:44
Definition: SDL2Keyboard.hpp:85
Definition: SDL2Keyboard.hpp:147
Definition: SDL2Keyboard.hpp:62
Definition: SDL2Keyboard.hpp:33
Definition: SDL2Keyboard.hpp:127
Definition: SDL2Keyboard.hpp:51
Definition: SDL2Keyboard.hpp:32
Definition: SDL2Keyboard.hpp:28
Definition: SDL2Keyboard.hpp:131
Definition: SDL2Keyboard.hpp:136
Definition: SDL2Keyboard.hpp:19
Definition: SDL2Keyboard.hpp:68
Definition: SDL2Keyboard.hpp:139
Definition: SDL2Keyboard.hpp:107
Definition: SDL2Keyboard.hpp:115
Definition: SDL2Keyboard.hpp:83
Definition: SDL2Keyboard.hpp:78
Definition: SDL2Keyboard.hpp:54
Definition: SDL2Keyboard.hpp:60
Definition: SDL2Keyboard.hpp:101
Definition: SDL2Keyboard.hpp:146
Definition: SDL2Keyboard.hpp:133
Definition: SDL2Keyboard.hpp:141
Definition: SDL2Keyboard.hpp:106