al_get_keyboard_state(3)
β¨ al_get_keyboard_state(3) β¨
okay bestie, so this is from the Library Functions Manual and it's literally the entire Allegro 5 API page for al_get_keyboard_state β short, sweet, and lowkey iconic π
π NAME π
al_get_keyboard_state β Allegro 5 API. that's it, that's the whole name, no notes π«Ά
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
void al_get_keyboard_state(ALLEGRO_KEYBOARD_STATE *ret_state)
π¦ DESCRIPTION π¦
okay so here's the vibe: you call this function, and it saves the state of the keyboard β like, the state of the keyboard at the exact moment the function gets called β°β¨ β and it drops all that into the structure that ret_state is pointing at.
so yeah: pass in a pointer to an ALLEGRO_KEYBOARD_STATE, and boom, you've got a snapshot of what the keyboard was doing right then. main character energy fr fr π
ngl, if ret_state isn't pointing somewhere valid, that's on you β the page doesn't promise anything cute happens π
π SEE ALSO π
al_key_down(3)β the "was this key pressed" bestie πal_clear_keyboard_state(3)β the "okay reset, fresh start" one π§ΉALLEGRO_KEYBOARD_STATE(3)β the structure itself, the whole vibe β¨
and that's the page!! mwah π brought to you by the Allegro reference manual β go forth and read your keyboard state, queen ππ¦π
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms