]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/terminfo.head
ncurses 6.4 - patch 20230917
[ncurses.git] / man / terminfo.head
1 .\"***************************************************************************
2 .\" Copyright 2018-2021,2023 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.51 2023/09/17 08:29:38 tom Exp $
31 .TH terminfo 5 2023-09-17 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "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 .ie \n(.g .ds ^ \(ha
39 .el       .ds ^ ^
40 .ie \n(.g .ds ~ \(ti
41 .el       .ds ~ ~
42 .ie n .ds CW R
43 .el   \{
44 .ie \n(.g .ds CW CR
45 .el       .ds CW CW
46 .\}
47 .de bP
48 .ie n  .IP \(bu 4
49 .el    .IP \(bu 2
50 ..
51 .de NS
52 .ie n  .sp
53 .el    .sp .5
54 .ie n  .in +4
55 .el    .in +2
56 .nf
57 .ft \*(CW
58 ..
59 .de NE
60 .fi
61 .ft R
62 .ie n  .in -4
63 .el    .in -2
64 ..
65 .SH NAME
66 \fB\%terminfo\fP \-
67 terminal capability database
68 .SH SYNOPSIS
69 \*d/*/*
70 .SH DESCRIPTION
71 .I Terminfo
72 is a database describing terminals,
73 used by screen-oriented programs such as
74 \fBnvi\fP(1),
75 \fBlynx\fP(1),
76 \fBmutt\fP(1),
77 and other curses applications,
78 using high-level calls to libraries such as \fBcurses\fP(3X).
79 It is also used via low-level calls by non-curses applications
80 which may be screen-oriented (such as \fB@CLEAR@\fP(1))
81 or non-screen (such as \fB@TABS@\fP(1)).
82 .PP
83 .I Terminfo
84 describes terminals by giving a set of capabilities which they
85 have, by specifying how to perform screen operations, and by
86 specifying padding requirements and initialization sequences.
87 .PP
88 This manual describes \fBncurses\fP
89 version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
90 .SS Terminfo Entry Syntax
91 Entries in
92 .I terminfo
93 consist of a sequence of fields:
94 .bP
95 Each field ends with a comma \*(``,\*(''
96 (embedded commas may be
97 escaped with a backslash or written as \*(``\\054\*('').
98 .bP
99 White space between fields is ignored.
100 .bP
101 The first field in a \fIterminfo\fP entry begins in the first column.
102 .bP
103 Newlines and leading whitespace (spaces or tabs)
104 may be used for formatting entries for readability.
105 These are removed from parsed entries.
106 .IP
107 The \fB@INFOCMP@\fP \fB\-f\fP and \fB\-W\fP options rely on this to
108 format if-then-else expressions,
109 or to enforce maximum line-width.
110 The resulting formatted terminal description can be read by \fB@TIC@\fP.
111 .bP
112 The first field for each terminal gives the names which are known for the
113 terminal, separated by \*(``|\*('' characters.
114 .IP
115 The first name given is the most common abbreviation for the terminal
116 (its primary name),
117 the last name given should be a long name fully identifying the terminal
118 (see \fBlongname\fP(3X)),
119 and all others are treated as synonyms (aliases) for the primary terminal name.
120 .IP
121 X/Open Curses advises that all names but the last should be in lower case
122 and contain no blanks;
123 the last name may well contain upper case and blanks for readability.
124 .IP
125 This implementation is not so strict;
126 it allows mixed case in the primary name and aliases.
127 If the last name has no embedded blanks,
128 it allows that to be both an alias and a verbose name
129 (but will warn about this ambiguity).
130 .bP
131 Lines beginning with a \*(``#\*('' in the first column are treated as comments.
132 .IP
133 While comment lines are legal at any point, the output of \fB@CAPTOINFO@\fP
134 and \fB@INFOTOCAP@\fP (aliases for \fB@TIC@\fP)
135 will move comments so they occur only between entries.
136 .PP
137 Terminal names (except for the last, verbose entry) should
138 be chosen using the following conventions.
139 The particular piece of hardware making up the terminal should
140 have a root name, thus \*(``hp2621\*(''.
141 This name should not contain hyphens.
142 Modes that the hardware can be in, or user preferences, should
143 be indicated by appending a hyphen and a mode suffix.
144 Thus, a vt100 in 132-column mode would be vt100\-w.
145 The following suffixes should be used where possible:
146 .PP
147 .TS
148 center;
149 lb cb lb
150 l  l  l .
151 Suffix  Meaning Example
152 _
153 \-\fInn\fP      Number of lines on the screen   aaa\-60
154 \-\fIn\fPp      Number of pages of memory       c100\-4p
155 \-am    With automargins (usually the default)  vt100\-am
156 \-m     Mono mode; suppress color               ansi\-m
157 \-mc    Magic cookie; spaces when highlighting  wy30\-mc
158 \-na    No arrow keys (leave them in local)     c100\-na
159 \-nam   Without automatic margins               vt100\-nam
160 \-nl    No status line                          att4415\-nl
161 \-ns    No status line                          hp2626\-ns
162 \-rv    Reverse video                           c100\-rv
163 \-s     Enable status line                      vt100\-s
164 \-vb    Use visible bell instead of beep        wy370\-vb
165 \-w     Wide mode (> 80 columns, usually 132)   vt100\-w
166 .TE
167 .PP
168 For more on terminal naming conventions, see the \fBterm\fP(7) manual page.
169 .SS Terminfo Capabilities Syntax
170 The terminfo entry consists of several \fIcapabilities\fP,
171 i.e., features that the terminal has,
172 or methods for exercising the terminal's features.
173 .PP
174 After the first field (giving the name(s) of the terminal entry),
175 there should be one or more \fIcapability\fP fields.
176 These are boolean, numeric or string names with corresponding values:
177 .bP
178 Boolean capabilities are true when present, false when absent.
179 There is no explicit value for boolean capabilities.
180 .bP
181 Numeric capabilities have a \*(``#\*('' following the name,
182 then an unsigned decimal integer value.
183 .bP
184 String capabilities have a \*(``=\*('' following the name,
185 then an string of characters making up the capability value.
186 .IP
187 String capabilities can be split into multiple lines,
188 just as the fields comprising a terminal entry can be
189 split into multiple lines.
190 While blanks between fields are ignored,
191 blanks embedded within a string value are retained,
192 except for leading blanks on a line.
193 .PP
194 Any capability can be \fIcanceled\fP,
195 i.e., suppressed from the terminal entry,
196 by following its name with \*(``@\*(''
197 rather than a capability value.
198 .SS Similar Terminals
199 If there are two very similar terminals, one (the variant) can be defined as
200 being just like the other (the base) with certain exceptions.
201 In the
202 definition of the variant, the string capability \fBuse\fP can be given with
203 the name of the base terminal:
204 .bP
205 The capabilities given before
206 .B use
207 override those in the base type named by
208 .BR use .
209 .bP
210 If there are multiple \fBuse\fP capabilities, they are merged in reverse order.
211 That is, the rightmost \fBuse\fP reference is processed first, then the one to
212 its left, and so forth.
213 .bP
214 Capabilities given explicitly in the entry override
215 those brought in by \fBuse\fP references.
216 .PP
217 A capability can be canceled by placing \fBxx@\fP to the left of the
218 use reference that imports it, where \fIxx\fP is the capability.
219 For example, the entry
220 .RS
221 .PP
222 2621\-nl, smkx@, rmkx@, use=2621,
223 .RE
224 .PP
225 defines a 2621\-nl that does not have the \fBsmkx\fP or \fBrmkx\fP capabilities,
226 and hence does not turn on the function key labels when in visual mode.
227 This is useful for different modes for a terminal, or for different
228 user preferences.
229 .PP
230 An entry included via \fBuse\fP can contain canceled capabilities,
231 which have the same effect as if those cancels were inline in the
232 using terminal entry.
233 .SS Predefined Capabilities
234 .\" Head of terminfo man page ends here
235 .ps -1