key_pressed (number);
Checks whether a certain the
key or button with the scancode given by number (see
key mapping
) is
pressed.Parameters:
number - scancode of key to check.
Returns:
On - pressed
Off - not pressed
Speed:
Fast
Example:
// wait until [f1] is pressed
while(key_pressed(59) == off)
{
wait(1);
}
See also:
key_for_string, str_for_key, key_set, key_lastpressed, inkey, key mapping