exkeys(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

πŸ’– exkeys(3) β€” the Allegro manual's cutest keyboard tour πŸ’–

okay bestie, so this is exkeys(3) from the Allegro manual β€” and it's literally the manual page for an example program that teaches you every single way to get input from the keyboard. no cap. we're going through all of them. πŸŽ€


✨ NAME ✨

exkeys β€” how to get input from the keyboard in different ways. it's part of the Allegro game programming library. πŸ’…


🌸 SYNOPSIS 🌸

#include <allegro.h>

Example exkeys

like, that's the whole vibe. one include, one example. iconic. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so this program is a whole demo of how to access the keyboard, and it's broken up into stages, like a lil glow-up montage for input handling. 🌈

  • First part β€” shows the basic use of readkey(). the starter pack. 🍼
  • Second part β€” shows how to extract the ASCII value. yes, the actual character, bestie. πŸ”€
  • Third part β€” next come the scan codes. πŸ‘€
  • Fourth test β€” detects modifier keys like alt or shift. those sneaky lil guys. πŸ’€
  • Fifth test β€” this one requires some focus to be passed. like, actually pay attention for this one, fr fr. πŸ™ˆ
  • Final step β€” shows how to use the global key array to read simultaneous key presses. yes, multiple keys at once. main character multitasking energy. πŸ‘‘

and then β€” plot twist β€” the last method to detect key presses is keyboard callbacks. πŸŽ‰

this is demonstrated by installing a keyboard callback, which marks all pressed keys by drawing to a grid.

so it literally draws a lil grid and lights up every key you press. obsessed. that's the demo. periodt. πŸ’…


🫢 SEE ALSO 🫢

okay so if you wanna go deeper, here's the whole squad, no one left behind:


and that's the whole page bestie!! πŸ’– this lil masterpiece came from Allegro, version 4.4.3, and it's filed under exkeys(3). go press some keys, you got this. πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from