al_set_keyboard_leds(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸ’– al_set_keyboard_leds(3) β€” Allegro 5 API, but make it cute

okay bestie, this is the al_set_keyboard_leds(3) page from the Library Functions Manual / Allegro reference manual, and it's all about making those tiny keyboard LEDs behave. πŸ’…βœ¨

✨ NAME ✨

al_set_keyboard_leds β€” Allegro 5 API. periodt. πŸ‘‘

🌈 SYNOPSIS 🌈

#include <allegro5/allegro.h>

bool al_set_keyboard_leds(int leds)

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so this function overrides the state of the keyboard LED indicators. Iconic behavior, honestly. πŸŽ€

You set leds to a combination of the keyboard modifier flags, and the corresponding LED indicators get enabled. The supported ones are ALLEGRO_KEYMOD_NUMLOCK, ALLEGRO_KEYMOD_CAPSLOCK, and ALLEGRO_KEYMOD_SCROLLLOCK β€” those three are literally the whole lineup. ✨

Or set leds to -1 to return to default behavior. Very β€œreset the vibe” of you. 😌

False is returned if the current keyboard driver cannot set LED indicators. No cap, that's the warning, bestie. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘


that's the whole page, bestie πŸŽ€ β€” footer tea: source/version is Allegro reference manual, and the date slot is not shown on this page, so we're not inventing one, periodt. πŸ’œ

πŸ“¦ 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