keypressed(3)
β¨ NAME β¨
keypressed β tells you if there are keypresses waiting in the input buffer. This is the keypressed(3) page from the Allegro manual, aka the Allegro game programming library. π
π₯ SYNOPSIS π₯
#include <allegro.h>
int keypressed();
π DESCRIPTION π
Okay so keypressed() returns TRUE if there are keypresses waiting in the input buffer. That's the whole vibe check. π¦
You can use this to see if the next call to readkey() is going to block, or to simply wait for the user to press a key while you still update the screen β possibly drawing some animation. Iconic, no cap. β¨
Example:
while (!keypressed()) {
/* Show cool animated logo. */
}
/* So he skipped our title screen. */
π SEE ALSO π
install_keyboard(3)readkey(3)ureadkey(3)clear_keybuf(3)simulate_keypress(3)simulate_ukeypress(3)
Allegro manual, version 4.4.3, keypressed(3) β that's the footer tea, bestie. No date listed, just the source and version, and that's periodt. ππ
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms