KEY_UP_SPECIAL

KEY_UP_SPECIAL

RETURNS THE CODE OF THE SPECIAL KEY THE USER IS RELEASING

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

ACTION

The system variable KEY_UP_SPECIAL returns the code of the special key (CTRL, SHIFT or ALT) the user is releasing with another key. It is usable only in the treatment of event ON_KEY_UP happening on a system object.

It indicates if the user releases the keys CTRL, SHIFT or ALT with another key:

Returns 0 if no key CTRL, SHIFT or ALT

Returns 1 if SHIFT

Returns 2 if ALT

Returns 3 if CTRL

Returns 4 if SHIFT and ALT

Returns 5 if SHIFT and CRTL

Returns 6 if ALT and CRTL

SYNTAX: KEY_UP_SPECIAL in an expression

USE

  • The system variable KEY_UP_SPECIAL is used in the treatment of event ON_KEY_UP to know the code of the special key the user is releasing (CTRL, SHIFT or ALT).

ERROR

  • None.

EXAMPLE

rem declare a label

label enter_key

rem an EDIT is created

edit 1:left 1,200: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"

select key_up_special

case 0

print " "+chr$(key_up_code)

case 1

print "SHIFT "+chr$(key_up_code)

case 2

print "ALT "+chr$(key_up_code)

case 3

print "CTRL "+chr$(key_up_code)

case 4

print "SHIFT+ALT "+chr$(key_up_code)

case 5

print "SHIFT+CTRL "+chr$(key_up_code)

case 6

print "ALT+CTRL "+chr$(key_up_code)

end_select

return

SEE ALSO

KEY_DOWN_CODE

KEY_DOWN_SPECIAL

KEY_UP_CODE

ON_KEY_DOWN

ON_KEY_UP