key_status — Status of a keyboard key
bool key_status(uint8 code);
Get the current status, pressed or not pressed, of the key specified by code.
The key_status() returns the current status any keyboard key without the need of mapping the key to an controller I/O. |
Returns true if the keyboard key is pressed, FALSE
otherwise.
#include <keyboard.gph> main { if(key_status(KEY_RETURNORENTER)) { set_val(BUTTON_5, 100.0); } }