SED - Dynamic Key Bindings
The key bindings used in the function descriptions in this manual are the defaults used by SED, known as the fundamental mode bindings. The dynamic key binding system allows these to be changed if desired.
On entry, SED looks for a file named &SED.BINDINGS&. In most cases where this exists, it would be set up as a remote file pointer to a single file shared by all accounts. This file contains records defining named sets of key bindings.
SED works through a sequence of steps in locating the binding record to be used. This sequence, described below, is designed to allow almost any user or terminal specific precedence rules to be created.
Try the (optional) name in field 3 of the &SED.OPTIONS& VOC record.
Try a name constructed from loginname-termtype where both the login name and the terminal type are mapped to upper case.
Try USER.loginname where the login name is mapped to upper case.
Try termtype where the terminal type is mapped to upper case.
Try the (optional) name in field 4 of the &SED.OPTIONS& VOC record.
Revert to the fundamental mode bindings.
If there is no &SED.BINDINGS& file, SED uses the fundamental mode key bindings.
Key bindings can be changed at run time by use of the LOAD.KEYS command. This takes the name of a key binding record as its argument and the bindings defined in that record will be loaded.
Fundamental mode can be restored by use of the FUNDAMENTAL command.
The SAVE.KEYS command saves the current key bindings into a record named in the command argument (e.g. SAVE.KEYS DEFAULT to generate the DEFAULT bindings record).
Key binding records consist of a series of lines (fields), each of which defines one or more bindings for the function associated with that line separated by value marks. Control characters are represented by @A, @B, etc. for Ctrl-A, Ctrl-B, etc. Thus escape is @[. The @ character can be included in a binding as @@. All characters before the first @ are ignored thus allowing comments to be included. The SAVE.KEYS command inserts the function name as a comment in each binding.
One way to create new bindings is to use SAVE.KEYS to create a template which is then edited to make any desired modifications. The quote char function followed by K inserts the key binding expansion of the next key pressed and can be used while editing a key binding record. This function simply inserts the characters sent by the next key pressed. It does not validate the modified binding record for duplicate or ambiguous key sequences.
Used in this way, quote char waits for the first character to arrive and then sleeps for one second. It then inserts the codes for all characters waiting to be processed. This ensures that the entire sequence sent by, for example, a function key is processed. You should wait until the character sequence appears on the screen before typing any further characters.