SDL 3.0
|
#include <SDL_events.h>
Keyboard button event structure (event.key.*)
The key
is the base SDL_Keycode generated by pressing the scancode
using the current keyboard layout, applying any options specified in SDL_HINT_KEYCODE_OPTIONS. You can get the SDL_Keycode corresponding to the event scancode and modifiers directly from the keyboard layout, bypassing SDL_HINT_KEYCODE_OPTIONS, by calling SDL_GetKeyFromScancode().
Definition at line 319 of file SDL_events.h.
SDL_bool SDL_KeyboardEvent::down |
SDL_TRUE if the key is pressed
Definition at line 330 of file SDL_events.h.
SDL_Keycode SDL_KeyboardEvent::key |
SDL virtual key code
Definition at line 327 of file SDL_events.h.
SDL_Keymod SDL_KeyboardEvent::mod |
current key modifiers
Definition at line 328 of file SDL_events.h.
Uint16 SDL_KeyboardEvent::raw |
The platform dependent scancode for this event
Definition at line 329 of file SDL_events.h.
SDL_bool SDL_KeyboardEvent::repeat |
SDL_TRUE if this is a key repeat
Definition at line 331 of file SDL_events.h.
Uint32 SDL_KeyboardEvent::reserved |
Definition at line 322 of file SDL_events.h.
SDL_Scancode SDL_KeyboardEvent::scancode |
SDL physical key code
Definition at line 326 of file SDL_events.h.
Uint64 SDL_KeyboardEvent::timestamp |
In nanoseconds, populated using SDL_GetTicksNS()
Definition at line 323 of file SDL_events.h.
SDL_EventType SDL_KeyboardEvent::type |
SDL_EVENT_KEY_DOWN or SDL_EVENT_KEY_UP
Definition at line 321 of file SDL_events.h.
SDL_KeyboardID SDL_KeyboardEvent::which |
The keyboard instance id, or 0 if unknown or virtual
Definition at line 325 of file SDL_events.h.
SDL_WindowID SDL_KeyboardEvent::windowID |
The window with keyboard focus, if any
Definition at line 324 of file SDL_events.h.