[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
SET KEY
SET KEY allows a procedure to be executed from any wait state when a
designated key is pressed.
Syntax
SET KEY <expN> TO [<proc>]
Argument
<expN> is the INKEY() value of the designated key.
<procedure> is the procedure that executes when the assigned key is
pressed. If the procedure is not specified the current key
redefinition is released.
Usage
A wait state is defined as any command that pauses program execution,
such as: WAIT, ACCEPT, READ, INPUT, MENU TO. Note that INKEY() is not
a wait state.
A maximum of 32 keys may be SET at one time. At start-up, the system
assumes that KEY 28 is SET to HELP.
Like Help.prg, three automatic parameters are passed to the SET KEY
procedure. The parameters are "calling program", "line number", and
"input variable". "Calling program" and "input variable" are both
character type and "line number" is numeric type.
As a rule, CLEAR or READ should not be used in SET KEY procedures if
the wait state is READ since both commands clear the pending GETs in
the calling program. To clear the screen, use @ 0,0 CLEAR instead.
Note: SET KEY takes precedence over SET FUNCTION for the definition
of a function key.
See Also:
KEYBOARD
SET FUNCTION
LASTKEY()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson