EXECUTES THE PROGRAM FROM LABEL L WHEN THE USER PRESSES ANY KEY WHILE THE SYSTEM OBJECT NUMBER N HAS FOCUS
ACTION
The command ON_KEY_DOWN N,L assigns a label (which must be defined in the program) from which the program will run every time the user presses any key of the keyboard, while the system object designated by the number N has focus.
The system object must be one of the following types: BUTTON, EDIT, MEMO, COMBO, FORM, LIST, CHECK, OPTION, SPIN, GRID, MEMO_RICH, BUTTON_PICTURE, SCENE2D, GRID_DRAW, SYNEDIT.
SYNTAX:
ON_KEY_DOWN N,L
USE ERROR EXAMPLE
rem declare a label
label enter_key
rem an EDIT is created
edit 1
rem every time a key is released in EDIT, execute from label "enter_key"
on_key_up 1,enter_key
end: rem main program is finished
enter_key:
rem treatment of event
if key_up_code=13 then caption 0,"ENTER is pressed"
return
ON_KEY_DOWN
ON_KEY_DOWN N,L
SEE ALSO
KEY_DOWN_CODE
KEY_DOWN_SPECIAL
KEY_UP_CODE
KEY_UP_SPECIAL
ON_KEY_UP