SDL_KeyboardDeviceEvent(3type)
π SDL_KeyboardDeviceEvent π
okay bestie, welcome to the SDL3 DATATYPES corner of the group chat π«Ά this one is SDL_KeyboardDeviceEvent β the keyboard device event structure, aka the event.kdevice.* situation β¨
πΈ NAME πΈ
SDL_KeyboardDeviceEvent β Keyboard device event structure (event.kdevice.*) β¨οΈπ
β¨ SYNOPSIS β¨
like, first you gotta pull in the header, no cap:
#include <SDL3/SDL_events.h>
then here's the whole struct, character for character, because we do not mess with the facts:
typedef struct SDL_KeyboardDeviceEvent
{
SDL_EventType type; /**< SDL_EVENT_KEYBOARD_ADDED or SDL_EVENT_KEYBOARD_REMOVED */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_KeyboardID which; /**< The keyboard instance id */
} SDL_KeyboardDeviceEvent;
the way that type is literally SDL_EVENT_KEYBOARD_ADDED or SDL_EVENT_KEYBOARD_REMOVED?? iconic π
and timestamp is in nanoseconds, populated using SDL_GetTicksNS() β slay β±οΈ
and which is the keyboard instance id, iykyk π
π¦ AVAILABILITY π¦
this struct is available since SDL 3.2.0 β so if you're on anything older, bestie, it's giving not found π
lowkey a whole vibe, highkey just a struct. but it's our struct now π
Simple Directmedia Layer Β· SDL 3.4.18 Β· SDL_KeyboardDeviceEvent(3type) β mwah, that's the whole page, periodt π β¨ go forth and handle those keyboard device events, queen ππ¦
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms