Navigation:  Language Reference > 13 - Built-in Functions >====== KEYBOARD (return keystroke waiting) ====== Previous pageReturn to chapter overviewNext page

KEYBOARD( )

blk2blue.jpg

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