15 #include <vsg/app/Window.h>
16 #include <vsg/core/observer_ptr.h>
17 #include <vsg/ui/WindowEvent.h>
24 enum KeySymbol : uint16_t
100 KEY_Ampersand = 0x26,
102 KEY_Leftparen = 0x28,
103 KEY_Rightparen = 0x29,
111 KEY_Semicolon = 0x3B,
117 KEY_Leftbracket = 0x5B,
118 KEY_Backslash = 0x5C,
119 KEY_Rightbracket = 0x5D,
121 KEY_Underscore = 0x5F,
122 KEY_Backquote = 0x60,
123 KEY_Leftcurlybracket = 0x7B,
124 KEY_Verticalslash = 0x7C,
125 KEY_Rightcurlybracket = 0x7D,
128 KEY_BackSpace = 0xFF08,
130 KEY_Linefeed = 0xFF0A,
134 KEY_Scroll_Lock = 0xFF14,
135 KEY_Sys_Req = 0xFF15,
147 KEY_Page_Up = 0xFF55,
149 KEY_Page_Down = 0xFF56,
157 KEY_Execute = 0xFF62,
166 KEY_Mode_switch = 0xFF7E,
167 KEY_Script_switch = 0xFF7E,
168 KEY_Num_Lock = 0xFF7F,
172 KEY_KP_Space = 0xFF80,
174 KEY_KP_Enter = 0xFF8D,
179 KEY_KP_Home = 0xFF95,
180 KEY_KP_Left = 0xFF96,
182 KEY_KP_Right = 0xFF98,
183 KEY_KP_Down = 0xFF99,
184 KEY_KP_Prior = 0xFF9A,
185 KEY_KP_Page_Up = 0xFF9A,
186 KEY_KP_Next = 0xFF9B,
187 KEY_KP_Page_Down = 0xFF9B,
189 KEY_KP_Begin = 0xFF9D,
190 KEY_KP_Insert = 0xFF9E,
191 KEY_KP_Delete = 0xFF9F,
192 KEY_KP_Equal = 0xFFBD,
193 KEY_KP_Multiply = 0xFFAA,
195 KEY_KP_Separator = 0xFFAC,
196 KEY_KP_Subtract = 0xFFAD,
197 KEY_KP_Decimal = 0xFFAE,
198 KEY_KP_Divide = 0xFFAF,
256 KEY_Shift_L = 0xFFE1,
257 KEY_Shift_R = 0xFFE2,
258 KEY_Control_L = 0xFFE3,
259 KEY_Control_R = 0xFFE4,
260 KEY_Caps_Lock = 0xFFE5,
261 KEY_Shift_Lock = 0xFFE6,
267 KEY_Super_L = 0xFFEB,
268 KEY_Super_R = 0xFFEC,
269 KEY_Hyper_L = 0xFFED,
273 enum KeyModifier : uint16_t
290 KeyEvent(
Window* in_window, time_point in_time, KeySymbol in_keyBase, KeySymbol in_keyModified, KeyModifier in_modifier, uint32_t in_repeatCount = 0) :
293 keyModified(in_keyModified),
294 keyModifier(in_modifier),
295 repeatCount(in_repeatCount) {}
297 KeySymbol keyBase = {};
298 KeySymbol keyModified = {};
299 KeyModifier keyModifier = {};
300 uint32_t repeatCount = 0;
302 void read(
Input& input)
override;
303 void write(
Output& output)
const override;
313 KeyPressEvent(
Window* in_window, time_point in_time, KeySymbol in_keyBase, KeySymbol in_keyModified, KeyModifier in_modifier, uint32_t in_repeatCount = 0) :
314 Inherit(in_window, in_time, in_keyBase, in_keyModified, in_modifier, in_repeatCount) {}
324 KeyReleaseEvent(
Window* in_window, time_point in_time, KeySymbol in_keyBase, KeySymbol in_keyModified, KeyModifier in_modifier, uint32_t in_repeatCount = 0) :
325 Inherit(in_window, in_time, in_keyBase, in_keyModified, in_modifier, in_repeatCount) {}
KeyEvent is a base class for key events.
Definition: KeyEvent.h:286
KeyPressEvent represents a key press event.
Definition: KeyEvent.h:309
KeyReleaseEvent represents a key release event.
Definition: KeyEvent.h:320