(This is the documentation for SDL3, which is under heavy development and the API is changing! SDL2 is the current stable version!)

SDL_StartTextInput

Start accepting Unicode text input events.

Header File

Defined in <SDL3/SDL_keyboard.h>

Syntax

void SDL_StartTextInput(void);

Remarks

This function will start accepting Unicode text input events in the focused SDL window, and start emitting SDL_TextInputEvent (SDL_EVENT_TEXT_INPUT) and SDL_TextEditingEvent (SDL_EVENT_TEXT_EDITING) events. Please use this function in pair with SDL_StopTextInput().

Text input events are not received by default.

On some platforms using this function activates the screen keyboard.

Version

This function is available since SDL 3.0.0.

See Also


CategoryAPI, CategoryAPIFunction, CategoryKeyboard