---
name: "al_set_keyboard_leds"
section: "3alleg5"
platform: "linux"
package: "allegro5-doc"
version: "2:5.2.10.1+dfsg-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/al_set_keyboard_leds/3alleg5"
---

# al\_set\_keyboard\_leds(3alleg5)

Allegro 5 API

## NAME

al\_set\_keyboard\_leds - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  bool al_set_keyboard_leds(int leds)
  ```

## DESCRIPTION

Overrides the state of the keyboard LED indicators. Set `leds` to a combination of the keyboard modifier flags to enable the corresponding LED indicators (`ALLEGRO_KEYMOD_NUMLOCK`, `ALLEGRO_KEYMOD_CAPSLOCK` and `ALLEGRO_KEYMOD_SCROLLLOCK` are supported) or to -1 to return to default behavior. False is returned if the current keyboard driver cannot set LED indicators.

## SEE ALSO

al\_can\_set\_keyboard\_leds(3alleg5)
