]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man5/termcap.5
Fixed unbalanced .nf/fi pairs.
[thirdparty/man-pages.git] / man5 / termcap.5
CommitLineData
fea681da
MK
1.\" Copyright (c) 1993 Michael Haardt (michael@moria.de), Fri Apr 2 11:32:09 MET DST 1993
2.\"
3.\" This is free documentation; you can redistribute it and/or
4.\" modify it under the terms of the GNU General Public License as
5.\" published by the Free Software Foundation; either version 2 of
6.\" the License, or (at your option) any later version.
7.\"
8.\" The GNU General Public License's references to "object code"
9.\" and "executables" are to be interpreted as the output of any
10.\" document formatting or typesetting system, including
11.\" intermediate and printed output.
12.\"
13.\" This manual is distributed in the hope that it will be useful,
14.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
15.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16.\" GNU General Public License for more details.
17.\"
18.\" You should have received a copy of the GNU General Public
19.\" License along with this manual; if not, write to the Free
20.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
21.\" USA.
22.\"
23.\" Modified formatting Sat Jul 24 17:13:38 1993, Rik Faith (faith@cs.unc.edu)
24.\" Modified (extensions and corrections) Sun May 1 14:21:25 MET DST 1994 Michael Haardt
25.\" If mistakes in the capabilities are found, please send a bug report to:
26.\" michael@moria.de
27.\" Modified Mon Oct 21 17:47:19 EDT 1996 by Eric S. Raymond (esr@thyrsus.com)
e127c16a 28.TH TERMCAP 5 1996-10-21 "Linux" "Linux Programmer's Manual"
fea681da
MK
29.SH NAME
30termcap \- terminal capability database
31.SH DESCRIPTION
32The termcap database is an obsolete facility for describing the
c13182ef
MK
33capabilities of character-cell terminals and printers.
34It is retained only for capability with old programs;
35new ones should use the
fea681da
MK
36.BR terminfo (5)
37database and associated libraries.
38.LP
8478ee02 39.I /etc/termcap
fea681da 40is an ASCII file (the database master) that lists the capabilities of
c13182ef
MK
41many different types of terminals.
42Programs can read termcap to find
fea681da 43the particular escape codes needed to control the visual attributes of
c13182ef
MK
44the terminal actually in use.
45(Other aspects of the terminal are
46handled by
1e321034 47.BR stty (1).)
097585ed
MK
48The termcap database is indexed on the
49.B TERM
fea681da
MK
50environment variable.
51.LP
928410b4 52Termcap entries must be defined on a single logical line, with '\\'
c13182ef 53used to suppress the newline.
928410b4 54Fields are separated by ':'.
c13182ef
MK
55The first field of each entry starts at the left-hand margin,
56and contains a list of names for the terminal, separated by '|'.
fea681da
MK
57.LP
58The first subfield may (in BSD termcap entries from versions 4.3 and
c13182ef
MK
59prior) contain a short name consisting of two characters.
60This short name may consist of capital or small letters.
61In 4.4BSD termcap entries this field is omitted.
fea681da
MK
62.LP
63The second subfield (first, in the newer 4.4BSD format) contains the
097585ed
MK
64name used by the environment variable
65.BR TERM .
c13182ef
MK
66It should be spelled in lowercase letters.
67Selectable hardware capabilities should be marked
68by appending a hyphen and a suffix to this name.
69See below for an example.
70Usual suffixes are w (more than 80 characters wide), am
fea681da 71(automatic margins), nam (no automatic margins), and rv (reverse video
c13182ef
MK
72display).
73The third subfield contains a long and descriptive name for
fea681da
MK
74this termcap entry.
75.LP
76Subsequent fields contain the terminal capabilities; any continued
77capability lines must be indented one tab from the left margin.
78.LP
79Although there is no defined order, it is suggested to write first
80boolean, then numeric, and then string capabilities, each sorted
c13182ef
MK
81alphabetically without looking at lower or upper spelling.
82Capabilities of similar functions can be written in one line.
fea681da
MK
83.LP
84.nf
85Example for:
86.sp
87Head line: vt|vt101|DEC VT 101 terminal in 80 character mode:\e
88Head line: Vt|vt101-w|DEC VT 101 terminal in (wide) 132 character mode:\e
89Boolean: :bs:\e
90Numeric: :co#80:\e
91String: :sr=\eE[H:\e
c8250206 92.fi
fea681da
MK
93.SS "Boolean Capabilities"
94.nf
955i Printer will not echo on screen
96am Automatic margins which means automatic line wrap
97bs Control-H (8 dec.) performs a backspace
98bw Backspace on left margin wraps to previous line and right margin
99da Display retained above screen
100db Display retained below screen
101eo A space erases all characters at cursor position
102es Escape sequences and special characters work in status line
103gn Generic device
104hc This is a hardcopy terminal
105HC The cursor is hard to see when not on bottom line
106hs Has a status line
107hz Hazeltine bug, the terminal can not print tilde characters
28d88c17 108in Terminal inserts null bytes, not spaces, to fill whitespace
fea681da
MK
109km Terminal has a meta key
110mi Cursor movement works in insert mode
111ms Cursor movement works in standout/underline mode
112NP No pad character
113NR ti does not reverse te
114nx No padding, must use XON/XOFF
115os Terminal can overstrike
116ul Terminal underlines although it can not overstrike
117xb Beehive glitch, f1 sends ESCAPE, f2 sends ^C
118xn Newline/wraparound glitch
119xo Terminal uses xon/xoff protocol
120xs Text typed over standout text will be displayed in standout
121xt Teleray glitch, destructive tabs and odd standout mode
122.fi
123.SS "Numeric Capabilities"
124.nf
125co Number of columns
126dB Delay in milliseconds for backspace on hardcopy terminals
127dC Delay in milliseconds for carriage return on hardcopy terminals
128dF Delay in milliseconds for form feed on hardcopy terminals
129dN Delay in milliseconds for new line on hardcopy terminals
130dT Delay in milliseconds for tabulator stop on hardcopy terminals
c8722768
MK
131dV Delay in milliseconds for vertical tabulator stop on
132 hardcopy terminals
fea681da
MK
133it Difference between tab positions
134lh Height of soft labels
135lm Lines of memory
136lw Width of soft labels
137li Number of lines
138Nl Number of soft labels
139pb Lowest baud rate which needs padding
140sg Standout glitch
141ug Underline glitch
142vt virtual terminal number
143ws Width of status line if different from screen width
144.fi
145.SS "String Capabilities"
146.nf
147!1 shifted save key
148!2 shifted suspend key
149!3 shifted undo key
150#1 shifted help key
151#2 shifted home key
152#3 shifted input key
153#4 shifted cursor left key
154%0 redo key
155%1 help key
156%2 mark key
157%3 message key
158%4 move key
159%5 next-object key
160%6 open key
161%7 options key
162%8 previous-object key
163%9 print key
164%a shifted message key
165%b shifted move key
166%c shifted next key
167%d shifted options key
168%e shifted previous key
169%f shifted print key
170%g shifted redo key
171%h shifted replace key
be88d3f7 172%i shifted cursor right key
fea681da
MK
173%j shifted resume key
174&0 shifted cancel key
175&1 reference key
176&2 refresh key
177&3 replace key
178&4 restart key
179&5 resume key
180&6 save key
181&7 suspend key
182&8 undo key
183&9 shifted begin key
184*0 shifted find key
185*1 shifted command key
186*2 shifted copy key
187*3 shifted create key
188*4 shifted delete character
189*5 shifted delete line
190*6 select key
191*7 shifted end key
192*8 shifted clear line key
193*9 shifted exit key
194@0 find key
195@1 begin key
196@2 cancel key
197@3 close key
198@4 command key
199@5 copy key
200@6 create key
201@7 end key
202@8 enter/send key
203@9 exit key
204al Insert one line
9fdfa163 205AL Insert %1 lines
fea681da
MK
206ac Pairs of block graphic characters to map alternate character set
207ae End alternative character set
208as Start alternative character set for block graphic characters
209bc Backspace, if not ^H
210bl Audio bell
211bt Move to previous tab stop
212cb Clear from beginning of line to cursor
213cc Dummy command character
214cd Clear to end of screen
215ce Clear to end of line
216ch Move cursor horizontally only to column %1
217cl Clear screen and cursor home
218cm Cursor move to row %1 and column %2 (on screen)
219CM Move cursor to row %1 and column %2 (in memory)
220cr Carriage return
221cs Scroll region from line %1 to %2
222ct Clear tabs
223cv Move cursor vertically only to line %1
224dc Delete one character
225DC Delete %1 characters
226dl Delete one line
227DL Delete %1 lines
228dm Begin delete mode
229do Cursor down one line
230DO Cursor down #1 lines
231ds Disable status line
232eA Enable alternate character set
233ec Erase %1 characters starting at cursor
234ed End delete mode
235ei End insert mode
236ff Formfeed character on hardcopy terminals
237fs Return character to its position before going to status line
238F1 The string sent by function key f11
239F2 The string sent by function key f12
240F3 The string sent by function key f13
241\&... \&...
242F9 The string sent by function key f19
243FA The string sent by function key f20
244FB The string sent by function key f21
245\&... \&...
246FZ The string sent by function key f45
247Fa The string sent by function key f46
248Fb The string sent by function key f47
249\&... \&...
250Fr The string sent by function key f63
251hd Move cursor a half line down
252ho Cursor home
253hu Move cursor a half line up
254i1 Initialization string 1 at login
255i3 Initialization string 3 at login
256is Initialization string 2 at login
257ic Insert one character
258IC Insert %1 characters
259if Initialization file
260im Begin insert mode
261ip Insert pad time and needed special characters after insert
262iP Initialization program
263K1 upper left key on keypad
264K2 center key on keypad
265K3 upper right key on keypad
266K4 bottom left key on keypad
267K5 bottom right key on keypad
268k0 Function key 0
269k1 Function key 1
270k2 Function key 2
271k3 Function key 3
272k4 Function key 4
273k5 Function key 5
274k6 Function key 6
275k7 Function key 7
276k8 Function key 8
277k9 Function key 9
278k; Function key 10
279ka Clear all tabs key
280kA Insert line key
281kb Backspace key
282kB Back tab stop
283kC Clear screen key
284kd Cursor down key
285kD Key for delete character under cursor
286ke turn keypad off
287kE Key for clear to end of line
9fdfa163 288kF Key for scrolling forward/down
fea681da
MK
289kh Cursor home key
290kH Cursor hown down key
291kI Insert character/Insert mode key
292kl Cursor left key
293kL Key for delete line
294kM Key for exit insert mode
295kN Key for next page
296kP Key for previous page
297kr Cursor right key
9fdfa163 298kR Key for scrolling backward/up
fea681da
MK
299ks Turn keypad on
300kS Clear to end of screen key
301kt Clear this tab key
302kT Set tab here key
303ku Cursor up key
304l0 Label of zeroth function key, if not f0
305l1 Label of first function key, if not f1
306l2 Label of first function key, if not f2
307\&... \&...
308la Label of tenth function key, if not f10
309le Cursor left one character
310ll Move cursor to lower left corner
311LE Cursor left %1 characters
312LF Turn soft labels off
313LO Turn soft labels on
314mb Start blinking
315MC Clear soft margins
316md Start bold mode
317me End all mode like so, us, mb, md and mr
318mh Start half bright mode
319mk Dark mode (Characters invisible)
320ML Set left soft margin
321mm Put terminal in meta mode
322mo Put terminal out of meta mode
323mp Turn on protected attribute
324mr Start reverse mode
325MR Set right soft margin
326nd Cursor right one character
327nw Carriage return command
328pc Padding character
329pf Turn printer off
330pk Program key %1 to send string %2 as if typed by user
331pl Program key %1 to execute string %2 in local mode
1954b6a9 332pn Program soft label %1 to show string %2
fea681da
MK
333po Turn the printer on
334pO Turn the printer on for %1 (<256) bytes
335ps Print screen contents on printer
336px Program key %1 to send string %2 to computer
337r1 Reset string 1 to set terminal to sane modes
338r2 Reset string 2 to set terminal to sane modes
339r3 Reset string 3 to set terminal to sane modes
340RA disable automatic margins
341rc Restore saved cursor position
ef50679c 342rf Reset string filename
fea681da
MK
343RF Request for input from terminal
344RI Cursor right %1 characters
345rp Repeat character %1 for %2 times
346rP Padding after character sent in replace mode
347rs Reset string
348RX Turn off XON/XOFF flow control
349sa Set %1 %2 %3 %4 %5 %6 %7 %8 %9 attributes
350SA enable automatic margins
351sc Save cursor position
352se End standout mode
353sf Normal scroll one line
354SF Normal scroll %1 lines
355so Start standout mode
356sr Reverse scroll
357SR scroll back %1 lines
358st Set tabulator stop in all rows at current column
359SX Turn on XON/XOFF flow control
360ta move to next hardware tab
361tc Read in terminal description from another entry
362te End program that uses cursor motion
363ti Begin program that uses cursor motion
364ts Move cursor to column %1 of status line
365uc Underline character under cursor and move cursor right
366ue End underlining
367up Cursor up one line
368UP Cursor up %1 lines
369us Start underlining
370vb Visible bell
371ve Normal cursor visible
9fdfa163 372vi Cursor invisible
fea681da
MK
373vs Standout cursor
374wi Set window from line %1 to %2 and column %3 to %4
375XF XOFF character if not ^S
376.fi
377.LP
378There are several ways of defining the control codes for string capabilities:
379.LP
9fdfa163 380Every normal character represents itself, except '^','\e' and '%'.
fea681da 381.LP
c13182ef
MK
382A '^x' means Control-x.
383Control-A equals 1 decimal.
fea681da 384.LP
c13182ef
MK
385\ex means a special code.
386x can be one of the following characters:
fea681da
MK
387.RS
388E Escape (27)
389.br
390n Linefeed (10)
391.br
392r Carriage return (13)
393.br
394t Tabulation (9)
395.br
396b Backspace (8)
397.br
398f Form feed (12)
399.br
c13182ef
MK
4000 Null character.
401A \exxx specifies the octal character xxx.
fea681da
MK
402.RE
403.IP i
9fdfa163 404Increments parameters by one.
fea681da
MK
405.IP r
406Single parameter capability
407.IP +
408Add value of next character to this parameter and do binary output
409.IP 2
410Do ASCII output of this parameter with a field with of 2
411.IP d
412Do ASCII output of this parameter with a field with of 3
413.IP %
414Print a '%'
415.LP
416If you use binary output, then you should avoid the null character
c13182ef
MK
417because it terminates the string.
418You should reset tabulator expansion
fea681da
MK
419if a tabulator can be the binary output of a parameter.
420.IP Warning:
421The above metacharacters for parameters may be wrong, they document Minix
422termcap which may not be compatible with Linux termcap.
423.LP
424The block graphic characters can be specified by three string capabilities:
425.IP as
426start the alternative charset
427.IP ae
428end it
429.IP ac
c13182ef
MK
430pairs of characters.
431The first character is the name of the block graphic
fea681da
MK
432symbol and the second characters is its definition.
433.LP
434The following names are available:
435.sp
436.nf
437+ right arrow (>)
438, left arrow (<)
439\&. down arrow (v)
4400 full square (#)
9fdfa163 441I lantern (#)
fea681da
MK
442- upper arrow (^)
443\&' rhombus (+)
444a chess board (:)
445f degree (')
446g plus-minus (#)
447h square (#)
448j right bottom corner (+)
449k right upper corner (+)
450l left upper corner (+)
451m left bottom corner (+)
452n cross (+)
453o upper horizontal line (-)
454q middle horizontal line (-)
455s bottom horizontal line (_)
456t left tee (+)
457u right tee (+)
458v bottom tee (+)
459w normal tee (+)
460x vertical line (|)
461~ paragraph (???)
462.fi
463.sp
464The values in parentheses are suggested defaults which are used by curses,
465if the capabilities are missing.
466.SH "SEE ALSO"
b99ec2bd 467.BR ncurses (3),
fea681da
MK
468.BR termcap (3),
469.BR terminfo (5)