SDL_TextInputEvent(3type)
β¨ SDL_TextInputEvent β¨
okay bestie, this is a page from the SDL3 DATATYPES manual, and today we're learning about SDL_TextInputEvent β the keyboard text input event structure, aka event.text.*. it's giving keyboard gossip. π
πΈ NAME πΈ
SDL_TextInputEvent β Keyboard text input event structure (event.text.*)
π¦ SYNOPSIS π¦
#include <SDL3/SDL_events.h>
typedef struct SDL_TextInputEvent
{
SDL_EventType type; /**< SDL_EVENT_TEXT_INPUT */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_WindowID windowID; /**< The window with keyboard focus, if any */
const char *text; /**< The input text, UTF-8 encoded */
} SDL_TextInputEvent;
like, that's the whole struct, no notes, we love a compact icon π
π DESCRIPTION π
okay so here's the tea and it's kind of a big one: this event will never be delivered unless text input is enabled by calling SDL_StartTextInput().
and text input is disabled by default!! not me finding that out the hard way π so if you're sitting there like "why is my SDL_EVENT_TEXT_INPUT not firing", bestie, you forgot to start it. that's the vibe check. do the call. slay.
β AVAILABILITY β
This struct is available since SDL 3.2.0. periodt. π
π«Ά SEE ALSO π«Ά
and that's the page fr fr β¨ this one came from the Simple Directmedia Layer peeps, SDL 3.4.18, dated SDL_TextInputEvent(3type) β go enable your text input and eat, bestie ππ¦πΈ
π¦ 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