ON KEY LABEL Command Example

The following example displays a message when an arrow key is pressed.

CLEAR
PUBLIC msg
msg = CHR(13) + CHR(13) + "Press F9 to " + ;
   "restore default key definition."
ON KEY LABEL RIGHTARROW Wait Window "Right Arrow " + msg NOWAIT
ON KEY LABEL LEFTARROW Wait Window "Left Arrow " + msg NOWAIT
ON KEY LABEL UPARROW Wait Window "Up Arrow " + msg NOWAIT
ON KEY LABEL DNARROW Wait Window "Down Arrow " + msg NOWAIT

* Press F9 to clear the ON KEY LABEL assignments
ON KEY LABEL F9 ON KEY