termcap(5) -- Linux man page

NAME

termcap - terminal capability database

DESCRIPTION

The termcap database is an obsolete facility for describing the
capabilities of character-cell terminals and printers. It is retained
only for capability with old programs; new ones should use the
terminfo(5)
database and associated libraries.

/etc/termcap
is an ASCII file (the database master) that lists the capabilities of
many different types of terminals. Programs can read termcap to find
the particular escape codes needed to control the visual attributes of
the terminal actually in use. (Other aspects of the terminal are
handled by stty.) The termcap database is indexed on the TERM
environment variable.

Termcap entries must be defined on a single logical line, with `\'
used to suppress the newline. Fields are separated by `:'. The first
field of each entry starts at the left-hand margin, and contains a list
of names for the terminal, separated by '|'.

The first subfield may (in BSD termcap entries from versions 4.3 and
prior) contain a short name consisting of two characters. This short
name may consist of capital or small letters. In 4.4BSD termcap
entries this field is omitted.

The second subfield (first, in the newer 4.4BSD format) contains the
name used by the environment variable TERM. It should be spelled in
lowercase letters. Selectable hardware capabilities should be marked
by appending a hyphen and a suffix to this name. See below for an
example. Usual suffixes are w (more than 80 characters wide), am
(automatic margins), nam (no automatic margins), and rv (reverse video
display). The third subfield contains a long and descriptive name for
this termcap entry.

Subsequent fields contain the terminal capabilities; any continued
capability lines must be indented one tab from the left margin.

Although there is no defined order, it is suggested to write first
boolean, then numeric, and then string capabilities, each sorted
alphabetically without looking at lower or upper spelling. Capabilities
of similar functions can be written in one line.

Boolean Capabilities

5i Printer will not echo on screen
am Automatic margins which means automatic line wrap
bs Control-H (8 dec.) performs a backspace
bw Backspace on left margin wraps to previous line and right margin
da Display retained above screen
db Display retained below screen
eo A space erases all characters at cursor position
es Escape sequences and special characters work in status line
gn Generic device
hc This is a hardcopy terminal
HC The cursor is hard to see when not on bottom line
hs Has a status line
hz Hazeltine bug, the terminal can not print tilde characters
in Terminal inserts nulls, not spaces, to fill whitespace
km Terminal has a meta key
mi Cursor movement works in insert mode
ms Cursor movement works in standout/underline mode
NP No pad character
NR ti does not reverse te
nx No padding, must use XON/XOFF
os Terminal can overstrike
ul Terminal underlines although it can not overstrike
xb Beehive glitch, f1 sends ESCAPE, f2 sends ^C
xn Newline/wraparound glitch
xo Terminal uses xon/xoff protocol
xs Text typed over standout text will be displayed in standout
xt Teleray glitch, destructive tabs and odd standout mode

Numeric Capabilities

co Number of columns
dB Delay in milliseconds for backspace on hardcopy terminals
dC Delay in milliseconds for carriage return on hardcopy terminals
dF Delay in milliseconds for form feed on hardcopy terminals
dN Delay in milliseconds for new line on hardcopy terminals
dT Delay in milliseconds for tabulator stop on hardcopy terminals
dV Delay in milliseconds for vertical tabulator stop on hardcopy terminals
it Difference between tab positions
lh Height of soft labels
lm Lines of memory
lw Width of soft labels
li Number of lines
Nl Number of soft labels
pb Lowest baud rate which needs padding
sg Standout glitch
ug Underline glitch
vt virtual terminal number
ws Width of status line if different from screen width