al_key_down
bool al_key_down(const ALLEGRO_KEYBOARD_STATE *state, int keycode)
Introduced in 5.0.0
Return true if the key specified was held down in the state specified.
See also: ALLEGRO_KEYBOARD_STATE
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)
- Mouse Click Inside Timer Function
- A shader that sets transparancy
- My second game, space invader simplified
- I'm new
- Same code - slow on Windows, fast on Linux - timer fires too slow?
- Footsteps sound effect
- Game Crashing and I'm not sure why?
- letters are rendered in their seperated form, this may require glyph hook maybe?
- [repost] Holding down a key makes the mouse laggy
Other recent discussions:
- Enter charaters/numbers from Keypad
- 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
- No windowed mode on Raspberry Pi Model B+?
- Gold Magic 8000 Game - Developed using Allegro and the Ring programming language
- Shader Puzzle aka Reverse Engineering cool effect
- Allegro 5 basic game loop