Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

keyboard_check_pressed

drewmccluskey edited this page Feb 12, 2019 · 4 revisions

keyboard_check_pressed

Returns if a keyboard key is being pressed

Syntax:

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

Returns: bool

Description:

This function will check if a specified key is being currently pressed and will run a function if so. This checks specifically the initial press, not the steps after while holding down the key.

Example:

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

This code will restart the game room when the user presses the R key.

Back to Keyboard

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /