ALLEGRO_KEYBOARD_STATE
typedef struct ALLEGRO_KEYBOARD_STATE ALLEGRO_KEYBOARD_STATE;
Introduced in 5.0.0
This is a structure that is used to hold a "snapshot" of a keyboard's state at a particular instant. It contains the following publically readable fields:
- display - points to the display that had keyboard focus at the time the state was saved. If no display was focused, this points to NULL.
You cannot read the state of keys directly. Use the function al_key_down.
Examples: ex_d3d, ex_drawpixels, ex_keyboard_focus, ex_lines, ex_mouse, ex_mouse_focus, ex_opengl_pixel_shader
Most helpful discussions:
- From A4 to A5: questions (console window, key presses,timers/sprite animation) (1)
- [A5] Show & Hide window/display Cross-Platform ?
- Why some Shaders don't work !
- Dsound undefined reference error when compiling using 5.2.1 binaries
- RPG Player
- Image Keyboard
- Allegro 5.1.13 released!
- al_draw_bitmap_region does not return
- [A5.0.10] Critical Issue with Keyboard Locking Up Due to Joystick Event Handling
- ALLEGRO 5 - Bitmap Corruption after writing to source image
Other recent discussions:
- No Key-Up event received on Alt+Tab out
- Show and Remove Text with the same key
- All bullets firing when I press my fire key
- How to press more than one key at the same time on Allegro 5?
- Problem with Sprite
- How to reset keystate Allegro5?
- display screen manipulation
- Looking for allegro expert, that would help us with development
- Bounding box collision problems.
- al_draw_text() Performance Issues