Gets the first character in the keyboard buffer.
Keyget n
Keyget n% waits for a key press and returns in n% a long word with the following layout:
Bit 0 to 7 - ASCII code
Bit 8 to 15 - Scan code
For a list of Scan and ASCII codes, see Key Codes and ASCII Values.
Local n%
OpenW # 1
Print "Press any key"
KeyGet n%
Print Hex$(n%, 4)
Waits for key entry and then returns the codes of the pressed key.
During the waiting period for a key to hit, GFA-BASIC 32 doesn't block other programs, but performs a DoEvents.
{Created by Sjouke Hamstra; Last updated: 11/10/2014 by James Gaite}