SDL_HINT_MAC_PRESS_AND_HOLD(3)

πŸ“¦
version 3.4.18 Β· 5 versions
, in fedora 43, fedora 44

πŸ’– 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