key_lastpressed
This variable contains the scancode of the last key or button pressed.
Range
0 .. 255
Type:
var, read-only
Remarks:
- The scancodes are listed in the "key functions" chapter.
-
The scancode can be converted to its ASCII equivalent with the str_for_key function.
Example
function test
{
while(key_lastpressed != 1) // wait for ESC
{
freeze_mode = 1;
wait(1);
}
freeze_mode = 0;
}
See also:
key_..., on_anykey, key_force, shift_sense, key_any,
str_for_key,
key_pressed
► latest
version online