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)
- Shooting Ball From Rotating Bitmap
- Mouse Click Inside Timer Function
- A shader that sets transparancy
- My second game, space invader simplified
- I'm new
- Keycode out of range
- Game Crashing and I'm not sure why?
- letters are rendered in their seperated form, this may require glyph hook maybe?
- Enter charaters/numbers from Keypad
Other recent discussions:
- get all pressed keys? (part two)
- To get shaders going.
- get all pressed keys?
- Weird flex with my Bitmaps on my Screen
- Upgrade from Allegro 5.0.10 to Allegro 5.2.5
- bitmap NullPtr exeption
- No windowed mode on Raspberry Pi Model B+?
- First person camera using transformations
- Shader Puzzle aka Reverse Engineering cool effect
- al_get_keyboard_state error