KEY_UP_CODE

KEY_UP_CODE

RETURNS THE CODE OF THE KEY THE USER IS RELEASING

  • Type: System Variable
  • Parameter: 0
  • Group: Events

ACTION

The system variable KEY_UP_CODE returns the code of the key the user is releasing. It is usable only in the treatment of event ON_KEY_UP happening on a system object.

The system variable is associated with KEY_UP_SPECIAL which indicates if the keys CTRL, SHIFT or ALT have been used at the same time.

SYNTAX: KEY_UP_CODE in an expression

USE

  • The system variable KEY_UP_CODE is used in the treatment of event ON_KEY_UP to know the code of the key the user is releasing.

ERROR

  • None.

EXAMPLE

rem declare a label

label enter_key

rem an EDIT is created

edit 1:set_focus 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 released"

return

SEE ALSO

KEY_DOWN_CODE

KEY_DOWN_SPECIAL

KEY_UP_SPECIAL

ON_KEY_DOWN

ON_KEY_UP