Command SET KEY Foundation

Associates a key with a procedure or function call.

Syntax
SET KEY <nInkey> TO [<ProcName>]
Scope
process-wide
Parameters
<nInkey>
<nInkey> is the numeric key code returned from the function Inkey() when the key or key combination is pressed.
<ProcName>
<ProcName> is the name of the procedure to associate with the key that produces the Inkey() code of <nInkey>. This procedure is automatically executed when the associated key is pressed during a wait condition, such as that occurring during READ or MemoEdit(). The association of the key with the function is removed when SET KEY TO is called without the argument <ProcName>.
Description

The command SET KEY exists for compatibility reasons and should no longer be used. The functions SetKey() and SetAppEvent() should be used in its place.

SET KEY connects a specific key with a call to a procedure. During the wait states of specific commands and functions, the procedure is automatically executed when the corresponding key is pressed. ACCEPT, INPUT, READ and WAIT as well as the functions AChoice(), DbEdit() and MemoEdit() all have wait states that allow automatic triggering of procedures set with SET KEY. Three arguments are passed to the procedure when it is automatically executed. These are the return values of the functions ProcName(), ProcLine() and ReadVar().

Examples
SET KEY
// See function SetKey() 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.