SDL_KeyboardID(3type)

✨ SDL_KeyboardID ✨

okay bestie, welcome to the SDL3 DATATYPES corner of the man pages πŸ’– this one's about SDL_KeyboardID, and it's literally so simple you'll be done in like twelve seconds. periodt.


πŸŽ€ NAME πŸŽ€

SDL_KeyboardID β€” this is a unique ID for a keyboard for the time it is connected to the system, and it is never reused for the lifetime of the application. no cap, never ever. πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_keyboard.h>

typedef Uint32 SDL_KeyboardID;

that's it. that's the whole vibe. a typedef and a dream πŸ¦‹


πŸ’œ DESCRIPTION πŸ’œ

so here's the tea πŸ“: if the keyboard gets disconnected and then reconnected, it will get a new ID. the old one does not come back, she has moved on and is living her best life.

also, heads up: the value 0 is an invalid ID. like, if you see a 0, that's not a keyboard, that's a void. do not trust it. πŸ™ˆ


🌈 AVAILABILITY 🌈

this datatype has been available since SDL 3.2.0. iconic behavior honestly, she's been serving since day one of 3.2. πŸ‘‘


and that's the whole page, you ate it fr fr πŸ’…βœ¨

Simple Directmedia Layer Β· SDL 3.4.18 Β· SDL_KeyboardID(3type) β€” mwah, ty for reading, go forth and identify your keyboards πŸ«ΆπŸ’–πŸŽ€

πŸ“¦ where this page comes from