SDL:TextInput
lastmod 2026-11-10created 2014-09-172 edits
Text input in SDL is a feature that delivers the characters the user actually typed as a Unicode string, instead of key codes. Once input mode is turned on with SDL_StartTextInput, UTF-8 characters arrive through SDL_TEXTINPUT events, and in-progress composition strings from an input method editor (IME), such as Korean or Japanese, arrive through SDL_TEXTEDITING events. To implement a text field that does not depend on the keyboard layout or input method, use this approach instead of key-down events.