set_leds(3)
๐ set_leds โ a manual page bestie
okay so this is set_leds(3), straight out of the Allegro manual โ yes, that Allegro, the Allegro game programming library ๐
she's a classic and she's serving.
โจ NAME โจ
set_leds โ sets the state of the keyboard LED indicators. that's it, that's the job. Allegro game programming library, no cap ๐
๐ฆ SYNOPSIS ๐ฆ
#include <allegro.h>
void set_leds(int leds);
like, one include, one function, one int. we love a low-effort icon โญ
๐ธ DESCRIPTION ๐ธ
so basically, set_leds overrides the state of the keyboard LED indicators. yes, those little lights on your keyboard. the ones your gamer keyboard has like 47 of. she's taking the wheel ๐ฎ
the parameter you pass in is a bitmask, and it can hold any of these:
KB_SCROLOCK_FLAGโ scroll lock, the forgotten one ๐ญKB_NUMLOCK_FLAGโ num lock, the divaKB_CAPSLOCK_FLAGโ caps lock, the one that ruins your whole group chat message
or you can pass -1 to restore the default behavior. like a little "nvm bestie, carry on" ๐ซถ
here's the example, verbatim, because we do not touch the code:
/* Cycle led indicators. */
set_leds(KB_SCROLOCK_FLAG);
rest(1000);
set_leds(KB_CAPSLOCK_FLAG);
rest(1000);
set_leds(KB_NUMLOCK_FLAG);
rest(1000);
set_leds(-1);
it's giving โจkeyboard raveโจ and honestly? obsessed.
โ ๏ธ okay bestie, real talk, this part matters โ ๏ธ note that the led behaviour cannot be guaranteed on some platforms. some leds might not react, or none at all. ๐ so you shouldn't rely only on them to communicate information to the user, just in case it doesn't get through. fr fr, don't make the blinking lights your whole communication strategy ๐
๐ SEE ALSO ๐
go read those too, they're friends of the family ๐ง
and that's the whole page, bestie!! this one came from the Allegro manual, version 4.4.3, and yeah โ it's the set_leds(3) page, so you already knew that ๐ tysm for reading, mwah ๐โจ๐
๐ฆ 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