al_set_keyboard_leds(3alleg5)
β¨ al_set_keyboard_leds β¨
okay bestie, we're in the allegro5 part of the Allegro reference manual, and today's main character is al_set_keyboard_leds β yes, the one that bosses your keyboard lights around π
π NAME π
al_set_keyboard_leds β Allegro 5 API β¨
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
bool al_set_keyboard_leds(int leds)
π¦ DESCRIPTION π¦
so basically this function overrides the state of the keyboard LED indicators. like, the little lights. the numlock glow. the caps lock situation. she's in charge now π
you pass in leds as a combination of the keyboard modifier flags, and whichever ones you include get their corresponding LED indicators turned on. the supported ones are:
ALLEGRO_KEYMOD_NUMLOCKALLEGRO_KEYMOD_CAPSLOCKALLEGRO_KEYMOD_SCROLLLOCK
or, plot twist, you set leds to -1 and everything goes back to the default behavior. no notes, we love a reset era π«Ά
and here's the part where you gotta listen, bestie: False gets returned if the current keyboard driver cannot set LED indicators. not a vibe, but that's just how it is π
π SEE ALSO π
al_can_set_keyboard_leds(3alleg5)β the little vibe check that tells you if any of this is even possible before you try it π
and that's the whole page, periodt π
this was the Allegro reference manual serving you al_set_keyboard_leds, from the al_set_keyboard_leds(3alleg5) chapter of our lives πβ¨ byeee π¦
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms