al_get_keyboard_state(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– al_get_keyboard_state(3alleg5) πŸ’–

okay bestie, welcome to the Allegro 5 API manual, but make it a group chat 🫢 this one is literally just one function, and it's iconic.


✨ NAME ✨

al_get_keyboard_state β€” it's an Allegro 5 API function, and it's the one that goes πŸ‘‘ "lemme peek at the keyboard real quick."


✨ SYNOPSIS ✨

#include <allegro5/allegro.h>

void al_get_keyboard_state(ALLEGRO_KEYBOARD_STATE *ret_state)

no cap, that's the whole signature. it returns void β€” it's not giving you a value back, it's giving you a snapshot. πŸ’…


✨ DESCRIPTION ✨

So here's the vibe: this function saves the state of the keyboard β€” as it was at the exact moment you called the function β€” into the structure that ret_state points to. 🌸

That's it. That's the whole thing. You hand it a pointer, it fills that structure with what the keyboard was doing right then. The way that it's literally a frozen little polaroid of your keyboard at one instant... obsessed. πŸ“Έβœ¨

heads up bestie: it's the state at the time the function is called β€” not some live, always-updating thing. it's a snapshot, periodt. πŸŽ€

✨ SEE ALSO ✨


and that's the whole page, bestie!! 🌈 this came to you straight from the Allegro reference manual, on the page al_get_keyboard_state(3alleg5) β€” go forth and read that keyboard state, you absolute legend πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from