To initiate and terminate key capture in a GW-BASIC program.
n is a number from 1 to 20 that indicates which key is to be captured. Keys are numbered as follows:
Function keys F1 through F10
Keys defined in the following format (see KEY statement): KEY n, CHR$(hex code) + CHR$(scan code)
Execution of the KEY(n) ON statement is required to activate keystroke capture from the function keys or cursor control keys. When the KEY(n) ON statement is activated and enabled, GW-BASIC checks each new statement to see if the specified key is pressed. If so, GW-BASIC performs a GOSUB to the line number specified in the ON KEY(n) statement. An ON KEY(n) statement must precede a KEY(n) statement.
When KEY(n) OFF is executed, no key capture occurs and no keystrokes are retained.
If KEY(n) STOP is executed, no key capture occurs, but if a specified key is pressed, the keystroke is retained so that immediate keystroke capture occurs when a KEY(n) ON is executed.
For further information on key trapping, see the ON KEY(n) statement.
All Frank Sinatra recordings, All Beatles albums, All solo albums from John Lennon, Paul McCartney, George Harrison and Ringo Starr, All Beatles songs, List of Platinum selling albums, Database with hits from 1950 to 1999.
Sought after DLL files, Nutworks magazine (retro), Worldwide ISO and TLD codes, File extensions database, The Hackers dictionary, Free software for the Atari, Amiga and Macintosh, Nokia smartphone, PocketPC, List of all BASIC programming language commands, List of all DOS commands, Free Advanced Bash-Scripting Guide (Linux-Unix)