Skip to content

keyboard_check_pressed

CryoEagle edited this page Jan 3, 2019 · 4 revisions

keyboard_check_pressed

Returns if keyboard is being pressed

Syntax:

keyboard_check_pressed(key)
Argument Description
Keys key The key button to being checked if is pressed

Returns: bool

Description:

This function will check if you pressed your selected key and then it will run code once time, for example you can use that for restarting game with key R and there are much more options for make game feel more comfortable.

Example:

if (keyboard_check_pressed(Keys.R))
{
    room_restart();
}

This code will restart room when press key R.

Back to Keyboard

Clone this wiki locally