Site Tools
Sidebar
User's Manual
t2:key_status
key_status
key_status — Status of a keyboard key
Description
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. |
Parameters
- code: Code of an keyboard key. Refer to keyboard.gph for the key codes definitions.
Return Value
Returns true if the keyboard key is pressed, FALSE
otherwise.
Examples
Example #1 key_status() example
#include <keyboard.gph> main { if(key_status(KEY_RETURNORENTER)) { set_val(BUTTON_5, 100.0); } }
See Also
t2/key_status.txt · Last modified: 2018/02/20 07:01 by J2Kbr