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