key_lastpressed

This variable contains the scancode of the last key or button pressed.

Range

0 .. 255

Type:

var, read-only

Remarks:

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