Return the next console key as a one-character string, or “” if none. Never blocks, except a short wait to finish a VT100 sequence. Arrow and function keys return one-byte codes (see table below).
A lone Escape waits up to 30 ms for the rest of a VT100 CSI sequence before INKEY$ returns it. Called from an interrupt handler, that wait also delays the handler and any due SETTICK until the sequence completes (or the 30 ms expire).
INKEY$ INKEY$()
Returns:
Up 128 Down 129 Left 130 Right 131 Insert 132 Home 134 End 135 PageUp 136 PageDown 137 Delete 127 F1-F12 145-156
Example:
IF INKEY$ = CHR$(128) THEN y = y - 1
IF INKEY$() <> "" THEN PRINT INKEY$()
Source: docs/help/inkey-dollar.txt inmmcore. On the computer, typeHELP INKEY$.