SDL_GetScancodeFromName(3)
π SDL_GetScancodeFromName π
okay bestie, so this is a page from the SDL3 FUNCTIONS manual, and it's literally all about turning a cute lil human-readable name into a scancode. yes. that's the whole vibe. let's get into it π«Ά
β¨ NAME β¨
SDL_GetScancodeFromName β bestie, it gets you a scancode from a human-readable name. that's it, that's the gig π
π SYNOPSIS π
#include <SDL3/SDL_keyboard.h>
SDL_Scancode SDL_GetScancodeFromName(const char *name);
like, look at her. so clean. so iconic. π
πΈ FUNCTION PARAMETERS πΈ
nameβ the human-readable scancode name. yes queen, you just hand her a name that a whole entire human can read, and she does the rest π
β RETURN VALUE β
she hands you back the SDL_Scancode, obviously. but not me when the name wasn't recognized β then you get SDL_SCANCODE_UNKNOWN instead π and if you wanna know why it flopped, call SDL_GetError() for more information. she always tells you what went wrong. communication queen fr fr π«Ά
π¦ THREAD SAFETY π¦
this function is not thread safe, bestie. do not pass her around the group chat from multiple threads at the same time. she's a one-conversation-at-a-time kind of girl π
π AVAILABILITY π
this function is available since SDL 3.2.0 β¨ so if you're on anything older, it's giving not found, iykyk.
π SEE ALSO π
the whole friend group, all linked up π§π
and that's the page, bestie!! brought to you by Simple Directmedia Layer π β SDL 3.4.18 era, and this is the SDL_GetScancodeFromName(3) girl herself signing off π
π bye 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