SDL_HINT_RETURN_KEY_HIDES_IME(3)
π SDL_HINT_RETURN_KEY_HIDES_IME π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, this one's a lil hint page and it's genuinely so useful if you're doing mobile stuff π«Ά
β¨ NAME β¨
SDL_HINT_RETURN_KEY_HIDES_IME β it's a variable that controls whether the return key on the soft keyboard should hide the soft keyboard, specifically on Android and iOS. like, should that lil return key yeet the keyboard away or not, that's the whole question π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_hints.h>
#define SDL_HINT_RETURN_KEY_HIDES_IME "SDL_RETURN_KEY_HIDES_IME"
no cap, that's the whole thing, you just pull it in and use the string π
π¦ DESCRIPTION π¦
so here's the tea: this hint sets the default value of SDL_PROP_TEXTINPUT_MULTILINE_BOOLEAN. lowkey important, so don't sleep on it.
the variable can be set to the following values:
"0"β the return key gets handled as a key event. (this is the default, bestie, if you don't set anything this is what you get β¨)"1"β the return key will hide the keyboard. poof, gone, keyboard cancelled π
and the best part?? this hint can be set anytime. no timing drama, no "omg did I set it too late", you're free π§
β AVAILABILITY β
this hint is available since SDL 3.2.0. if you're on something older, sorry babe, it's not there yet π
π‘ quick vibe check:"0"= return key does its key event thing,"1"= return key nukes the keyboard. defaults to"0". that's it, that's the page π
k bye ily, go forth and make your mobile text input behave π«Ά this was Simple Directmedia Layer, SDL 3.4.18, page SDL_HINT_RETURN_KEY_HIDES_IME(3) β mwah π
π¦ 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