Skip to content
Craig Edwards edited this page Apr 28, 2023 · 1 revision

INKEY$

INKEY$

Returns the key which has been pressed, or if no key has been pressed, an empty string. Note that this function will use the keyboard buffer, so if multiple keys have been pressed between this call and the last call to INKEY$ (or an INPUT statement) it will require multiple calls to the function to receive all of the keypresses.

The following keys on the keyboard are designated as 'extended keys' and will return the following character codes from INKEY$:

Key INKEY$ value
PAGEUP 245
PAGEDOWN 246
DEL 47
INS 48
END 49
UP 250
DOWN 251
LEFT 252
RIGHT 253
HOME 254
Clone this wiki locally