The termset program creates or modifies terminal escape sequences received from or sent to a particular terminal type. The format of the termset command is:
termset [-p] ['^X'] terminalname
The -p flag 'prints' the contents of the terminal definition file named by terminalname. The output appears on the screen unless it is redirected.
The '^X' argument defines the key <Ctrl>-X as the delimiter. (Note: The Control key <Ctrl> functions much like the Shift key in that it must be depressed when the key named by X is pressed.) This key sequence, <Ctrl>-<X>, then becomes the only means of terminating a function/special key or terminal escape sequence definition, as all other key sequences are themselves valid entries to termset when either keys or escape sequences are being defined. If this argument is not specified, then X is defined as X, thus making <Ctrl>-<X> the delimiter. (Note: Some terminals use this key sequence to 'lock-up' the keyboard, in which case this flag must be used in order to avoid such a conflict.) The use of the delimiter will become more apparent as you progress through the remainder of this chapter.
The last parameter, terminalname, is required and names the terminal being defined or modified. Termset interactively builds a table of terminal escape sequences for the terminal and stores the table in a file in the directory cbasedir/escape. The file has the same name as the terminalname parameter. If the file named by terminalname already exists, you will be asked for changes to the current terminal definition. If the file does not exist, however, termset creates the file and asks you, by means of a series of statements and prompts, for a new terminal definition.
There are three sections to complete when defining a new terminal with termset.
1. Define escape sequences sent to the computer by the terminal when a particular key is pressed.
1. Define escape sequences sent to the terminal by the computer to perform a particular function.
1. Define other terminal parameters.