INKEY$

Top  Previous  Next

Syntax

STRING = INKEY$(OPT raw=0 as INT)

Description

Returns a single character from the keyboard in console mode

Parameters

raw - Optional. .If equal to 1 the INKEY$ function will return the raw virtual code of the next key pressed, including function and special keys.

Return value

A one character string containing the value of the key pressed.

Remarks

INKEY$ is non blocking and will return an empty string, "", if there is no input present. OPENCONSOLE must have been executed prior to using the command or the process will lockup waiting for input.

See Also: INPUT, GETKEYSTATE, OPENCONSOLE

Example usage

OPENCONSOLE
PRINT "Press Q to quit"
DO: UNTIL INKEY$ = "Q"
CLOSECONSOLE
END