keyboard_check - hpgDesigns/hpgdesigns-dev.io GitHub Wiki
NOTOC {{-}}
Determines whether a key is currently being pressed or not. Accepts keyboard constants (eg. vk_space) for the space key.
- key, keyboard constant for which key to check the state of
Returns a boolean (true or false) value whether or not the key is currently being pressed.
if (keyboard_check(vk_right)) {
x += 5;
}
Demonstrates checking if the right arrow key is pressed, and if so, moving 5 pixels to the right on screen.