key_f1 ... key_f12, key_esc, key_tab, key_shift, key_ctrl, key_alt, key_space, key_bksp, key_cuu, key_cud, key_cur, key_cul, key_pgup, key_pgdn, key_home, key_end, key_ins, key_del, key_paus, key_car, key_cal, key_enter, key_0... key_9, key_a ... key_z

State of the keyboard keys. The key names reflect the physical mapping on the keyboard, not the character actually printed onto that key. The keyboard variables are listed in the "key functions" chapter.

Range:

off= not pressed
on = pressed

Type:

flag, read-only

Example:

function reagieren()
{ while(1) { if(key_x) // X pressed { exit(); } if(key_f1) // F1 pressed { help_panel.visible = (help_panel.visible == off); } wait(1); } }

See also:

on_anykey, key_force, shift_sense, key_any, key_lastpressed, key mapping