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