KEYBOARD (return keystroke waiting)

Top  Previous  Next

 

KEYBOARD( )

The KEYBOARD procedure returns the keycode of the first keystroke in the keyboard buffer. It is used to determine if there are keystrokes waiting to be processed by an ASK or ACCEPT statement.

Return Data Type:

UNSIGNED

Example:

LOOP UNTIL KEYBOARD()                    !Wait for any key

ASK

IF KEYCODE() = EscKey THEN BREAK END    !On esc key, break the loop

END

 

See Also:

ASK

ACCEPT

KEYCODE

Keycode Equate Labels