If the terminal requires other than a NUL (zero) character as a pad, this can be given as pc. Only the first character of the pc string is used.
If the terminal has commands to save and restore the position of the cursor, give them as sc and rc.
If the terminal has an extra "status line" that is not normally used by software, this fact can be indicated. If the status line is viewed as an extra line below the bottom line, then the capability hs should be given. Special strings to go to a position in the status line and to return from the status line can be given as ts and fs. ( fs must leave the cursor position in the same place that it was before ts. If necessary, the sc and rc strings can be included in ts and fs to get this effect.) The capability ts takes one parameter, which is the column number of the status line to which the cursor is to be moved. If escape sequences and other special commands such as tab work while in the status line, the flag es can be given. A string that turns off the status line (or otherwise erases its contents) should be given as ds. The status line is normally assumed to be the same width as the rest of the screen, i.e., co. If the status line is a different width (possibly because the terminal does not allow an entire line to be loaded), then its width in columns can be indicated with the numeric parameter ws.
If the terminal can move up or down half a line, this can be indicated with hu (half-line up) and hd (half-line down). This is primarily useful for superscripts and subscripts on hardcopy terminals. If a hardcopy terminal can eject to the next page (form feed), give this as ff (usually ^L).
If there is a command to repeat a given character a given number of times (to save time transmitting a large number of identical characters), this can be indicated with the parameterized string rp. The first parameter is the character to be repeated and the second is the number of times to repeat it. (This is a terminfo(5) feature that is unlikely to be supported by a program that uses .)
If the terminal has a settable command character, such as the Tektronix 4025, this can be indicated with CC. A prototype command character is chosen which is used in all capabilities. This character is given in the CC capability to identify it. The following convention is supported on some Unix systems: The environment is to be searched for a CC variable, and if found, all occurrences of the prototype character are replaced by the character in the environment variable. This use of the CC environment variable is a very bad idea, as it conflicts with make(1).
Terminal descriptions that do not represent a specific kind of known terminal, such as switch, dialup, patch, and network, should include the gn (generic) capability so that programs can complain that they do not know how to talk to the terminal. (This capability does not apply to virtual terminal descriptions for which the escape sequences are known.)
If the terminal uses xoff/xon (DC3 / DC1) handshaking for flow control, give xo. Padding information should still be included so that routines can make better decisions about costs, but actual pad characters will not be transmitted.
If the terminal has a "meta key" which acts as a shift key, setting the 8th bit of any character transmitted, then this fact can be indicated with km. Otherwise, software will assume that the 8th bit is parity and it will usually be cleared. If strings exist to turn this "meta mode" on and off, they can be given as mm and mo.
If the terminal has more lines of memory than will fit on the screen at once, the number of lines of memory can be indicated with lm. An explicit value of 0 indicates that the number of lines is not fixed, but that there is still more memory than fits on the screen.
If the terminal is one of those supported by the Unix system virtual terminal protocol, the terminal number can be given as vt.
Media copy strings which control an auxiliary printer connected to the terminal can be given as ps: print the contents of the screen; pf: turn off the printer; and po: turn on the printer. When the printer is on, all text sent to the terminal will be sent to the printer. It is undefined whether the text is also displayed on the terminal screen when the printer is on. A variation pO takes one parameter and leaves the printer on for as many characters as the value of the parameter, then turns the printer off. The parameter should not exceed 255. All text, including pf, is transparently passed to the printer while pO is in effect.
Strings to program function keys can be given as pk, pl, and px. Each of these strings takes two parameters: the function key number to program (from 0 to 9) and the string to program it with. Function key numbers out of this range may program undefined keys in a terminal-dependent manner. The differences among the capabilities are that pk causes pressing the given key to be the same as the user typing the given string; pl causes the string to be executed by the terminal in local mode; and px causes the string to be transmitted to the computer. Unfortunately, due to lack of a definition for string parameters in termcap, only terminfo(5) supports these capabilities.
Glitches and Braindamage
Hazeltine terminals, which do not allow ~ characters to be displayed, should indicate hz.
The nc capability, now obsolete, formerly indicated Datamedia terminals, which echo \r \n for carriage return then ignore a following linefeed.
Terminals that ignore a linefeed immediately after an am wrap, such as the Concept, should indicate xn.
If ce is required to get rid of standout (instead of merely writing normal text on top of it), xs should be given.
Teleray terminals, where tabs turn all characters moved over to blanks, should indicate xt (destructive tabs). This glitch is also taken to mean that it is not possible to position the cursor on top of a "magic cookie", and that to erase standout mode it is necessary to use delete and insert line.
The Beehive Superbee, which is unable to correctly transmit the ESC or ^C characters, has xb, indicating that the "f1" key is used for ESC and "f2" for ^C. (Only certain Superbees have this problem, depending on the ROM.)
Other specific terminal problems may be corrected by adding more capabilities of the form x x.
If there are two very similar terminals, one can be defined as being just like the other with certain exceptions. The string capability tc can be given with the name of the similar terminal. This capability must be last, and the combined length of the entries must not exceed 1024. The capabilities given before tc override those in the terminal type invoked by tc. A capability can be canceled by placing xx@ to the left of the tc invocation, where xx is the capability. For example, the entry
defines a "2621-nl" that does not have the ks or ke capabilities, hence does not turn on the function key labels when in visual mode. This is useful for different modes for a terminal, or for different user preferences.