Get the last key extracted from the keyboard buffer.
// Continue looping unless the ESC key was pressed in MainFunc()
WHILE TRUE
MainFunc()
IF LASTKEY() == K_ESC
EXIT
ENDIF
END WHILE
Tests
KEYBOARD "AB"; ? INKEY(), LASTKEY() ==> 65 65