---
name: "al_get_keyboard_state"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/al_get_keyboard_state"
---

# al\_get\_keyboard\_state(3)

Allegro 5 API

## NAME

al\_get\_keyboard\_state - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  void al_get_keyboard_state(ALLEGRO_KEYBOARD_STATE *ret_state)
  ```

## DESCRIPTION

Save the state of the keyboard specified at the time the function is called into the structure pointed to by *ret\_state*.

## SEE ALSO

[al\_key\_down(3)](/al_key_down/3.md), [al\_clear\_keyboard\_state(3)](/al_clear_keyboard_state/3.md), [ALLEGRO\_KEYBOARD\_STATE(3)](/ALLEGRO_KEYBOARD_STATE/3.md)
