KEYEXIT

Top  Previous  Next

 

The KEYEXIT statement defines exit keys for use with INPUT @.

 

 

Format

 

KEYEXIT (action, key), (action, key), ...

 

where

 

actionis a user defined value in the range 1 to 255 to be returned by the STATUS() function following an INPUT @ that is terminated by use of the key defined by key.

A negative action value removes the key binding specified by key.

 

keyidentifies the key to be bound to the given action. This is specified as a numeric value:
1 to 31Use the control key with this character value. Ctrl-A is 1, Ctrl-B is 2, etc.
32 to 159Use the Escape key followed by the key with this character value (e.g. Esc-A is 65).
160+Use a sequence of up to four characters constructed from the bytes of (key  160) starting from the low order byte.

 

 

The KEYEXIT statement defines one or more keys that will terminate an INPUT @ statement. When any of these keys in pressed the INPUT @ returns with the input data as entered up to the moment when this key was used. The STATUS() function will return the value defined by action for the key.

 

See the KEYTRAP statement for a method to return the original data.

 

 

See also:

BINDKEY(), INPUT@, INPUTFIELD, KEYCODE(), KEYEDIT, KEYTRAP