title: "KeyPressed" description: TRSE built-in method (from IDE help)
KeyPressed
Systems: X86, M1ARM
Parameters: —
Keypressed( [byte] );
- [byte] - key to test
Description
Tests whether the key specified in parameter 1 is presser or not. Returns 1 if true, 0 if not.
See CONSTANTS section in help for a list of KEY_ values available to use.
Example
if ( keypressed( KEY_R ) = 1 ) then ...