Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 1 | .\"*************************************************************************** |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 2 | .\" Copyright 2018-2023,2024 Thomas E. Dickey * |
| 3 | .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 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 | .\" |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 30 | .\" $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 Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 49 | .de bP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 50 | .ie n .IP \(bu 4 |
| 51 | .el .IP \(bu 2 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 52 | .. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 53 | . |
| 54 | .ds d @TERMINFO@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 55 | .SH NAME |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 56 | \fB\%terminfo\fP \- |
| 57 | terminal capability database |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 58 | .SH SYNOPSIS |
| 59 | \*d/*/* |
| 60 | .SH DESCRIPTION |
| 61 | .I Terminfo |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 62 | is a database describing terminals, |
| 63 | used by screen-oriented programs such as |
| 64 | \fBnvi\fP(1), |
| 65 | \fBlynx\fP(1), |
| 66 | \fBmutt\fP(1), |
| 67 | and other curses applications, |
| 68 | using high-level calls to libraries such as \fBcurses\fP(3X). |
| 69 | It is also used via low-level calls by non-curses applications |
| 70 | which may be screen-oriented (such as \fB@CLEAR@\fP(1)) |
| 71 | or non-screen (such as \fB@TABS@\fP(1)). |
| 72 | .PP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 73 | .I Terminfo |
| 74 | describes terminals by giving a set of capabilities which they |
| 75 | have, by specifying how to perform screen operations, and by |
| 76 | specifying padding requirements and initialization sequences. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 77 | .PP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 78 | This document describes |
| 79 | .I \%ncurses |
| 80 | version @NCURSES_MAJOR@.@NCURSES_MINOR@ |
| 81 | (patch @NCURSES_PATCH@). |
| 82 | .SS "\fIterminfo\fP Entry Syntax" |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 83 | Entries in |
| 84 | .I terminfo |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 85 | consist of a sequence of fields: |
| 86 | .bP |
| 87 | Each field ends with a comma \*(``,\*('' |
| 88 | (embedded commas may be |
| 89 | escaped with a backslash or written as \*(``\e054\*(''). |
| 90 | .bP |
| 91 | White space between fields is ignored. |
| 92 | .bP |
| 93 | The first field in a \fIterminfo\fP entry begins in the first column. |
| 94 | .bP |
| 95 | Newlines and leading whitespace (spaces or tabs) |
| 96 | may be used for formatting entries for readability. |
| 97 | These are removed from parsed entries. |
| 98 | .IP |
| 99 | The \fB@INFOCMP@\fP \fB\-f\fP and \fB\-W\fP options rely on this to |
| 100 | format if-then-else expressions, |
| 101 | or to enforce maximum line-width. |
| 102 | The resulting formatted terminal description can be read by \fB@TIC@\fP. |
| 103 | .bP |
| 104 | The first field for each terminal gives the names which are known for the |
| 105 | terminal, separated by \*(``|\*('' characters. |
| 106 | .IP |
| 107 | The first name given is the most common abbreviation for the terminal |
| 108 | (its primary name), |
| 109 | the last name given should be a long name fully identifying the terminal |
| 110 | (see \fBlongname\fP(3X)), |
| 111 | and all others are treated as synonyms (aliases) for the primary terminal name. |
| 112 | .IP |
| 113 | X/Open Curses advises that all names but the last should be in lower case |
| 114 | and contain no blanks; |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 115 | the last name may well contain upper case and blanks for readability. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 116 | .IP |
| 117 | This implementation is not so strict; |
| 118 | it allows mixed case in the primary name and aliases. |
| 119 | If the last name has no embedded blanks, |
| 120 | it allows that to be both an alias and a verbose name |
| 121 | (but will warn about this ambiguity). |
| 122 | .bP |
| 123 | Lines beginning with a \*(``#\*('' in the first column are treated as comments. |
| 124 | .IP |
| 125 | While comment lines are valid at any point, the output of \fB@CAPTOINFO@\fP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 126 | and \fB@INFOTOCAP@\fP (aliases for \fB@TIC@\fP) |
| 127 | will move comments so they occur only between entries. |
| 128 | .PP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 129 | Terminal names (except for the last, verbose entry) should |
| 130 | be chosen using the following conventions. |
| 131 | The particular piece of hardware making up the terminal should |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 132 | have a root name, thus \*(``hp2621\*(''. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 133 | This name should not contain hyphens. |
| 134 | Modes that the hardware can be in, or user preferences, should |
| 135 | be indicated by appending a hyphen and a mode suffix. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 136 | Thus, a vt100 in 132-column mode would be vt100\-w. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 137 | The following suffixes should be used where possible: |
| 138 | .PP |
| 139 | .TS |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 140 | center; |
| 141 | Lb Lb Lb |
| 142 | L L Lx. |
| 143 | Suffix 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 Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 158 | .TE |
| 159 | .PP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 160 | For more on terminal naming conventions, see the \fBterm\fP(7) manual page. |
| 161 | .SS "\fIterminfo\fP Capabilities Syntax" |
| 162 | The terminfo entry consists of several \fIcapabilities\fP, |
| 163 | i.e., features that the terminal has, |
| 164 | or methods for exercising the terminal's features. |
| 165 | .PP |
| 166 | After the first field (giving the name(s) of the terminal entry), |
| 167 | there should be one or more \fIcapability\fP fields. |
| 168 | These are Boolean, numeric or string names with corresponding values: |
| 169 | .bP |
| 170 | Boolean capabilities are true when present, false when absent. |
| 171 | There is no explicit value for Boolean capabilities. |
| 172 | .bP |
| 173 | Numeric capabilities have a \*(``#\*('' following the name, |
| 174 | then an unsigned decimal integer value. |
| 175 | .bP |
| 176 | String capabilities have a \*(``=\*('' following the name, |
| 177 | then an string of characters making up the capability value. |
| 178 | .IP |
| 179 | String capabilities can be split into multiple lines, |
| 180 | just as the fields comprising a terminal entry can be |
| 181 | split into multiple lines. |
| 182 | While blanks between fields are ignored, |
| 183 | blanks embedded within a string value are retained, |
| 184 | except for leading blanks on a line. |
| 185 | .PP |
| 186 | Any capability can be \fIcanceled\fP, |
| 187 | i.e., suppressed from the terminal entry, |
| 188 | by following its name with \*(``@\*('' |
| 189 | rather than a capability value. |
| 190 | .SS "Similar Terminals" |
| 191 | If there are two very similar terminals, one (the variant) can be defined as |
| 192 | being just like the other (the base) with certain exceptions. |
| 193 | In the |
| 194 | definition of the variant, the string capability \fBuse\fP can be given with |
| 195 | the name of the base terminal: |
| 196 | .bP |
| 197 | The capabilities given before |
| 198 | .B use |
| 199 | override those in the base type named by |
| 200 | .BR use . |
| 201 | .bP |
| 202 | If there are multiple \fBuse\fP capabilities, they are merged in reverse order. |
| 203 | That is, the rightmost \fBuse\fP reference is processed first, then the one to |
| 204 | its left, and so forth. |
| 205 | .bP |
| 206 | Capabilities given explicitly in the entry override |
| 207 | those brought in by \fBuse\fP references. |
| 208 | .PP |
| 209 | A capability can be canceled by placing \fBxx@\fP to the left of the |
| 210 | use reference that imports it, where \fIxx\fP is the capability. |
| 211 | For example, the entry |
| 212 | .RS |
| 213 | .PP |
| 214 | 2621\-nl, smkx@, rmkx@, use=2621, |
| 215 | .RE |
| 216 | .PP |
| 217 | defines a 2621\-nl that does not have the \fBsmkx\fP or \fBrmkx\fP capabilities, |
| 218 | and hence does not turn on the function key labels when in visual mode. |
| 219 | This is useful for different modes for a terminal, or for different |
| 220 | user preferences. |
| 221 | .PP |
| 222 | An entry included via \fBuse\fP can contain canceled capabilities, |
| 223 | which have the same effect as if those cancels were inline in the |
| 224 | using terminal entry. |
| 225 | .SS "Predefined Capabilities" |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 226 | .\" Head of terminfo man page ends here |
| 227 | .ps -1 |