KEYEDIT

Top  Previous  Next

 

The KEYEDIT statement defines editing keys for use with INPUT @.

 

 

Format

 

KEYEDIT (action, key), (action, key), ...

 

where

 

actionidentifies the editing action to be performed when the key is pressed. This may be:
2Cursor left
3Return
4Backspace
6Cursor right
7Insert character (treated as action 13)
8Delete character
13Toggle insert mode

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 KEYEDIT statement adds user defined alternative key bindings to the standard set used by the INPUT @ statement. These may validly replace default bindings. The newly bound keys remain in effect until either they are rebound by a further KEYEDIT statement or the process returns to the command prompt.

 

The INPUT @ statement checks for keys bound via the terminfo system or KEYEDIT before using the standard default bindings.

 

 

See also:

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