![]() |
Retro Rocket OS
BASIC-Powered Operating System
|
Returns the key that has been pressed as a string. If no key has been pressed since the last call, it returns an empty string.
INKEY$ consumes input from the keyboard buffer. If multiple keys have been pressed between this call and the last call to INKEY$ (or an INPUT statement), it will take multiple calls to retrieve them all.
Some non-printing keys return special character codes rather than ASCII. These values can be retrieved by wrapping INKEY$ with ASC().
| Key | ASC(INKEY$) value |
|---|---|
| PAGEUP | 245 |
| PAGEDOWN | 246 |
| DEL | 247 |
| INS | 248 |
| END | 249 |
| UP | 250 |
| DOWN | 251 |
| LEFT | 252 |
| RIGHT | 253 |
| HOME | 254 |