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