]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/terminfo.head
ncurses 6.2 - patch 20210828
[ncurses.git] / man / terminfo.head
1 .\"***************************************************************************
2 .\" Copyright 2018-2020,2021 Thomas E. Dickey                                *
3 .\" Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
4 .\"                                                                          *
5 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
6 .\" copy of this software and associated documentation files (the            *
7 .\" "Software"), to deal in the Software without restriction, including      *
8 .\" without limitation the rights to use, copy, modify, merge, publish,      *
9 .\" distribute, distribute with modifications, sublicense, and/or sell       *
10 .\" copies of the Software, and to permit persons to whom the Software is    *
11 .\" furnished to do so, subject to the following conditions:                 *
12 .\"                                                                          *
13 .\" The above copyright notice and this permission notice shall be included  *
14 .\" in all copies or substantial portions of the Software.                   *
15 .\"                                                                          *
16 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
17 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
18 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
19 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
20 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
21 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
22 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
23 .\"                                                                          *
24 .\" Except as contained in this notice, the name(s) of the above copyright   *
25 .\" holders shall not be used in advertising or otherwise to promote the     *
26 .\" sale, use or other dealings in this Software without prior written       *
27 .\" authorization.                                                           *
28 .\"***************************************************************************
29 .\"
30 .\" $Id: terminfo.head,v 1.41 2021/08/15 19:32:53 tom Exp $
31 .TH terminfo 5 "" "" "File Formats"
32 .ds n 5
33 .ds d @TERMINFO@
34 .ie \n(.g .ds `` \(lq
35 .el       .ds `` ``
36 .ie \n(.g .ds '' \(rq
37 .el       .ds '' ''
38 .de bP
39 .ie n  .IP \(bu 4
40 .el    .IP \(bu 2
41 ..
42 .de NS
43 .ie n  .sp
44 .el    .sp .5
45 .ie n  .in +4
46 .el    .in +2
47 .nf
48 .ft C                   \" Courier
49 ..
50 .de NE
51 .fi
52 .ft R
53 .ie n  .in -4
54 .el    .in -2
55 ..
56 .SH NAME
57 terminfo \- terminal capability database
58 .SH SYNOPSIS
59 \*d/*/*
60 .SH DESCRIPTION
61 .I Terminfo
62 is a database describing terminals,
63 used by screen-oriented programs such as
64 \fBnvi\fR(1),
65 \fBlynx\fR(1),
66 \fBmutt\fR(1),
67 and other curses applications,
68 using high-level calls to libraries such as \fBcurses\fR(3X).
69 It is also used via low-level calls by non-curses applications
70 which may be screen-oriented (such as \fB@CLEAR@\fP(1))
71 or non-screen (such as \fB@TABS@\fP(1)).
72 .PP
73 .I Terminfo
74 describes terminals by giving a set of capabilities which they
75 have, by specifying how to perform screen operations, and by
76 specifying padding requirements and initialization sequences.
77 .PP
78 This manual describes \fBncurses\fR
79 version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
80 .SS Terminfo Entry Syntax
81 .PP
82 Entries in
83 .I terminfo
84 consist of a sequence of fields:
85 .bP
86 Each field ends with a comma \*(``,\*(''
87 (embedded commas may be
88 escaped with a backslash or written as \*(``\\054\*('').
89 .bP
90 White space between fields is ignored.
91 .bP
92 The first field in a \fIterminfo\fP entry begins in the first column.
93 .bP
94 Newlines and leading whitespace (spaces or tabs)
95 may be used for formatting entries for readability.
96 These are removed from parsed entries.
97 .IP
98 The \fB@INFOCMP@\fP \fB\-f\fP and \fB\-W\fP options rely on this to
99 format if-then-else expressions,
100 or to enforce maximum line-width.
101 The resulting formatted terminal description can be read by \fB@TIC@\fP.
102 .bP
103 The first field for each terminal gives the names which are known for the
104 terminal, separated by \*(``|\*('' characters.
105 .IP
106 The first name given is the most common abbreviation for the terminal
107 (its primary name),
108 the last name given should be a long name fully identifying the terminal
109 (see \fBlongname\fP(3X)),
110 and all others are treated as synonyms (aliases) for the primary terminal name.
111 .IP
112 X/Open Curses advises that all names but the last should be in lower case
113 and contain no blanks;
114 the last name may well contain upper case and blanks for readability.
115 .IP
116 This implementation is not so strict;
117 it allows mixed case in the primary name and aliases.
118 If the last name has no embedded blanks,
119 it allows that to be both an alias and a verbose name
120 (but will warn about this ambiguity).
121 .bP
122 Lines beginning with a \*(``#\*('' in the first column are treated as comments.
123 .IP
124 While comment lines are legal at any point, the output of \fB@CAPTOINFO@\fP
125 and \fB@INFOTOCAP@\fP (aliases for \fB@TIC@\fP)
126 will move comments so they occur only between entries.
127 .PP
128 Terminal names (except for the last, verbose entry) should
129 be chosen using the following conventions.
130 The particular piece of hardware making up the terminal should
131 have a root name, thus \*(``hp2621\*(''.
132 This name should not contain hyphens.
133 Modes that the hardware can be in, or user preferences, should
134 be indicated by appending a hyphen and a mode suffix.
135 Thus, a vt100 in 132-column mode would be vt100\-w.
136 The following suffixes should be used where possible:
137 .PP
138 .TS
139 center ;
140 l c l
141 l l l.
142 \fBSuffix       Meaning Example\fP
143 \-\fInn\fP      Number of lines on the screen   aaa\-60
144 \-\fIn\fPp      Number of pages of memory       c100\-4p
145 \-am    With automargins (usually the default)  vt100\-am
146 \-m     Mono mode; suppress color               ansi\-m
147 \-mc    Magic cookie; spaces when highlighting  wy30\-mc
148 \-na    No arrow keys (leave them in local)     c100\-na
149 \-nam   Without automatic margins               vt100\-nam
150 \-nl    No status line                          att4415\-nl
151 \-ns    No status line                          hp2626\-ns
152 \-rv    Reverse video                           c100\-rv
153 \-s     Enable status line                      vt100\-s
154 \-vb    Use visible bell instead of beep        wy370\-vb
155 \-w     Wide mode (> 80 columns, usually 132)   vt100\-w
156 .TE
157 .PP
158 For more on terminal naming conventions, see the \fBterm\fP(7) manual page.
159 .SS Terminfo Capabilities Syntax
160 .PP
161 The terminfo entry consists of several \fIcapabilities\fP,
162 i.e., features that the terminal has,
163 or methods for exercising the terminal's features.
164 .PP
165 After the first field (giving the name(s) of the terminal entry),
166 there should be one or more \fIcapability\fP fields.
167 These are boolean, numeric or string names with corresponding values:
168 .bP
169 Boolean capabilities are true when present, false when absent.
170 There is no explicit value for boolean capabilities.
171 .bP
172 Numeric capabilities have a \*(``#\*('' following the name,
173 then an unsigned decimal integer value.
174 .bP
175 String capabilities have a \*(``=\*('' following the name,
176 then an string of characters making up the capability value.
177 .IP
178 String capabilities can be split into multiple lines,
179 just as the fields comprising a terminal entry can be
180 split into multiple lines.
181 While blanks between fields are ignored,
182 blanks embedded within a string value are retained,
183 except for leading blanks on a line.
184 .PP
185 Any capability can be \fIcanceled\fP,
186 i.e., suppressed from the terminal entry,
187 by following its name with \*(``@\*(''
188 rather than a capability value.
189 .SS Similar Terminals
190 .PP
191 If there are two very similar terminals, one (the variant) can be defined as
192 being just like the other (the base) with certain exceptions.
193 In the
194 definition of the variant, the string capability \fBuse\fR can be given with
195 the name of the base terminal:
196 .bP
197 The capabilities given before
198 .B use
199 override those in the base type named by
200 .BR use .
201 .bP
202 If there are multiple \fBuse\fR capabilities, they are merged in reverse order.
203 That is, the rightmost \fBuse\fR reference is processed first, then the one to
204 its left, and so forth.
205 .bP
206 Capabilities given explicitly in the entry override
207 those brought in by \fBuse\fR references.
208 .PP
209 A capability can be canceled by placing \fBxx@\fR to the left of the
210 use reference that imports it, where \fIxx\fP is the capability.
211 For example, the entry
212 .RS
213 .PP
214 2621\-nl, smkx@, rmkx@, use=2621,
215 .RE
216 .PP
217 defines a 2621\-nl that does not have the \fBsmkx\fR or \fBrmkx\fR capabilities,
218 and hence does not turn on the function key labels when in visual mode.
219 This is useful for different modes for a terminal, or for different
220 user preferences.
221 .PP
222 An entry included via \fBuse\fP can contain canceled capabilities,
223 which have the same effect as if those cancels were inline in the
224 using terminal entry.
225 .SS Predefined Capabilities
226 .\" Head of terminfo man page ends here
227 .ps -1