1al_clear_keyboard_state(3) al_clear_keyboard_state(3)
2
3
4
6 al_clear_keyboard_state - Allegro 5 API
7
9 #include <allegro5/allegro.h>
10
11 void al_clear_keyboard_state(ALLEGRO_DISPLAY *display)
12
14 Clear the state of the keyboard, emitting ALLEGRO_EVENT_KEY_UP(3) for
15 each currently pressed key. The given display is regarded as the one
16 which had the keyboard focus when the event occurred. In case display
17 is NULL no event is emitted. For most keyboard drivers Allegro main‐
18 tains its own state of the keyboard, which might get out of sync with
19 the real one. This function is intended to remedy such situation by
20 resetting Allegro’s keyboard state to a known default (no key pressed).
21 This is particularly useful in response to ALLEGRO_EVENT_DIS‐
22 PLAY_SWITCH_OUT(3) events.
23
25 al_get_keyboard_state(3), ALLEGRO_KEYBOARD_STATE(3)
26
28 5.2.3
29
30 [Unstable API]: This is a new feature and the exact semantics
31 are still being decided upon.
32
33
34
35Allegro reference manual al_clear_keyboard_state(3)