SDL_HasKeyboard(3)
π SDL_HasKeyboard(3) β SDL3 FUNCTIONS π
okay bestie, welcome to the SDL_HasKeyboard(3) page from the SDL3 FUNCTIONS manual. it's short, it's sweet, it's giving "do you have a keyboard plugged in?" energy. let's go π«Ά
β¨ NAME β¨
SDL_HasKeyboard β return whether a keyboard is currently connected. like, right now. present tense. no cap. π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_keyboard.h>
bool SDL_HasKeyboard(void);
that's the whole vibe. include the header, call the function, get a bool back. slay. β¨
π RETURN VALUE π
Returns true if a keyboard is connected, and false otherwise.
so: true = keyboard bestie is here π
, false = no keyboard detected π. simple as that.
π§΅ THREAD SAFETY π§΅
π¨ Only call this on the main thread. not a background thread, not a side thread, not a "but i thought it would be fine" thread. main thread. periodt. π
ποΈ AVAILABILITY ποΈ
This function is available since SDL 3.2.0. if you're kicking it with an older SDL, this one is not in the group chat yet. π¦
π SEE ALSO π
go peek at that one too, iykyk. π
mwah π β this came from Simple Directmedia Layer, version SDL 3.4.18, and the page signs off as SDL_HasKeyboard(3). the footer didn't print a date, bestie, so i'm not inventing one π«ΆπΈ
π¦ 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