al_set_keyboard_leds(3alleg5)

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

✨ 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_NUMLOCK
  • ALLEGRO_KEYMOD_CAPSLOCK
  • ALLEGRO_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 🌈


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