SDL_HINT_MAC_PRESS_AND_HOLD(3)
π SDL_HINT_MAC_PRESS_AND_HOLD π
okay bestie so this is a page from the SDL3 FUNCTIONS manual and we're gonna talk about one very specific little string define, and honestly? it's giving "tiny but mighty" β¨
πΈ NAME πΈ
SDL_HINT_MAC_PRESS_AND_HOLD β a variable that controls whether holding down a key repeats the pressed key, or opens the accents menu, on macOS. π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_hints.h>
#define SDL_HINT_MAC_PRESS_AND_HOLD "SDL_MAC_PRESS_AND_HOLD"
like yes that's the whole thing, it's a #define, it's a string, she's lowkey iconic π
π¦ DESCRIPTION π¦
so the variable can be set to these values, and you will pick one, no in-between bestie:
"0"β holding a key will repeat the pressed key. classic. reliable. the way it always was. π₯"1"β holding a key will open the accents menu for that key. and yes this is the default π
π¨ ok important: this hint needs to be set before SDL_Init(). like, before. if you set it after, that's on you, no cap. π
π AVAILABILITY π
this hint is available since SDL 3.4.0. so if you're on anything older, she is simply not there yet, sorry bestie π
Simple Directmedia Layer π«Ά SDL 3.4.18 π¦ SDL_HINT_MAC_PRESS_AND_HOLD(3) β and that's the whole page, mwah, slay, periodt πβ¨π
π¦ 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