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