al_key_down(3alleg5)

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

πŸ’– al_key_down πŸ’–

okay bestie, welcome to the al_key_down page from the Allegro 5 API manual πŸ’… this one's short and sweet and honestly it's giving "small but mighty", so let's get into it πŸŽ€


✨ NAME ✨

al_key_down β€” the Allegro 5 API function that tells you if a key is being held down 🫢


🌸 SYNOPSIS 🌸

#include <allegro5/allegro.h>

bool al_key_down(const ALLEGRO_KEYBOARD_STATE *state, int keycode)

no cap, that's the whole thing. she's compact πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: al_key_down returns true if the key you specified was held down in the state you specified. that's it. that's the function πŸ’–

like, you hand her a keyboard state and a keycode, and she's like "yeah bestie, that key was down" (true) or "nope, not down" (false). iconic behaviour honestly 🌈

remember: she's checking the state you gave her, so if you want current vibes, grab a fresh ALLEGRO_KEYBOARD_STATE first, iykyk ✨

πŸ‘‘ SEE ALSO πŸ‘‘

  • ALLEGRO_KEYBOARD_STATE(3alleg5) β€” go read this one too, she's the main character the whole function revolves around πŸ’œ

that's the whole page, bestie, short king energy fr fr πŸ’€βœ¨ this was the Allegro reference manual, al_key_down(3alleg5), from Allegro 5 β€” mwah, love that for us πŸŽ€πŸ’–πŸ¦‹

πŸ“¦ where this page comes from