LuK1337 | 52a81d5 | 2025-07-08 18:07:20 -0400 | [diff] [blame] | 1 | '\" t |
| 2 | .\" DO NOT EDIT THIS FILE BY HAND! |
| 3 | .\" It is generated from terminfo.head, ./../include/Caps ./../include/Caps-ncurses, and terminfo.tail. |
| 4 | .\" |
| 5 | .\" Note: this must be run through tbl before nroff. |
| 6 | .\" The magic cookie on the first line triggers this under some man programs. |
| 7 | .\"*************************************************************************** |
| 8 | .\" Copyright 2018-2023,2024 Thomas E. Dickey * |
| 9 | .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * |
| 10 | .\" * |
| 11 | .\" Permission is hereby granted, free of charge, to any person obtaining a * |
| 12 | .\" copy of this software and associated documentation files (the * |
| 13 | .\" "Software"), to deal in the Software without restriction, including * |
| 14 | .\" without limitation the rights to use, copy, modify, merge, publish, * |
| 15 | .\" distribute, distribute with modifications, sublicense, and/or sell * |
| 16 | .\" copies of the Software, and to permit persons to whom the Software is * |
| 17 | .\" furnished to do so, subject to the following conditions: * |
| 18 | .\" * |
| 19 | .\" The above copyright notice and this permission notice shall be included * |
| 20 | .\" in all copies or substantial portions of the Software. * |
| 21 | .\" * |
| 22 | .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * |
| 23 | .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * |
| 24 | .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * |
| 25 | .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * |
| 26 | .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * |
| 27 | .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * |
| 28 | .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * |
| 29 | .\" * |
| 30 | .\" Except as contained in this notice, the name(s) of the above copyright * |
| 31 | .\" holders shall not be used in advertising or otherwise to promote the * |
| 32 | .\" sale, use or other dealings in this Software without prior written * |
| 33 | .\" authorization. * |
| 34 | .\"*************************************************************************** |
| 35 | .\" |
| 36 | .\" $Id: terminfo.head,v 1.65 2024/04/20 21:14:00 tom Exp $ |
| 37 | .TH terminfo 5 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "File formats" |
| 38 | .ie \n(.g \{\ |
| 39 | .ds `` \(lq |
| 40 | .ds '' \(rq |
| 41 | .ds ' \(aq |
| 42 | .ds ^ \(ha |
| 43 | .ds ~ \(ti |
| 44 | .\} |
| 45 | .el \{\ |
| 46 | .ie t .ds `` `` |
| 47 | .el .ds `` "" |
| 48 | .ie t .ds '' '' |
| 49 | .el .ds '' "" |
| 50 | .ds ' ' |
| 51 | .ds ^ ^ |
| 52 | .ds ~ ~ |
| 53 | .\} |
| 54 | . |
| 55 | .de bP |
| 56 | .ie n .IP \(bu 4 |
| 57 | .el .IP \(bu 2 |
| 58 | .. |
| 59 | . |
| 60 | .ds d @TERMINFO@ |
| 61 | .SH NAME |
| 62 | \fB\%terminfo\fP \- |
| 63 | terminal capability database |
| 64 | .SH SYNOPSIS |
| 65 | \*d/*/* |
| 66 | .SH DESCRIPTION |
| 67 | .I Terminfo |
| 68 | is a database describing terminals, |
| 69 | used by screen-oriented programs such as |
| 70 | \fBnvi\fP(1), |
| 71 | \fBlynx\fP(1), |
| 72 | \fBmutt\fP(1), |
| 73 | and other curses applications, |
| 74 | using high-level calls to libraries such as \fBcurses\fP(3X). |
| 75 | It is also used via low-level calls by non-curses applications |
| 76 | which may be screen-oriented (such as \fB@CLEAR@\fP(1)) |
| 77 | or non-screen (such as \fB@TABS@\fP(1)). |
| 78 | .PP |
| 79 | .I Terminfo |
| 80 | describes terminals by giving a set of capabilities which they |
| 81 | have, by specifying how to perform screen operations, and by |
| 82 | specifying padding requirements and initialization sequences. |
| 83 | .PP |
| 84 | This document describes |
| 85 | .I \%ncurses |
| 86 | version @NCURSES_MAJOR@.@NCURSES_MINOR@ |
| 87 | (patch @NCURSES_PATCH@). |
| 88 | .SS "\fIterminfo\fP Entry Syntax" |
| 89 | Entries in |
| 90 | .I terminfo |
| 91 | consist of a sequence of fields: |
| 92 | .bP |
| 93 | Each field ends with a comma \*(``,\*('' |
| 94 | (embedded commas may be |
| 95 | escaped with a backslash or written as \*(``\e054\*(''). |
| 96 | .bP |
| 97 | White space between fields is ignored. |
| 98 | .bP |
| 99 | The first field in a \fIterminfo\fP entry begins in the first column. |
| 100 | .bP |
| 101 | Newlines and leading whitespace (spaces or tabs) |
| 102 | may be used for formatting entries for readability. |
| 103 | These are removed from parsed entries. |
| 104 | .IP |
| 105 | The \fB@INFOCMP@\fP \fB\-f\fP and \fB\-W\fP options rely on this to |
| 106 | format if-then-else expressions, |
| 107 | or to enforce maximum line-width. |
| 108 | The resulting formatted terminal description can be read by \fB@TIC@\fP. |
| 109 | .bP |
| 110 | The first field for each terminal gives the names which are known for the |
| 111 | terminal, separated by \*(``|\*('' characters. |
| 112 | .IP |
| 113 | The first name given is the most common abbreviation for the terminal |
| 114 | (its primary name), |
| 115 | the last name given should be a long name fully identifying the terminal |
| 116 | (see \fBlongname\fP(3X)), |
| 117 | and all others are treated as synonyms (aliases) for the primary terminal name. |
| 118 | .IP |
| 119 | X/Open Curses advises that all names but the last should be in lower case |
| 120 | and contain no blanks; |
| 121 | the last name may well contain upper case and blanks for readability. |
| 122 | .IP |
| 123 | This implementation is not so strict; |
| 124 | it allows mixed case in the primary name and aliases. |
| 125 | If the last name has no embedded blanks, |
| 126 | it allows that to be both an alias and a verbose name |
| 127 | (but will warn about this ambiguity). |
| 128 | .bP |
| 129 | Lines beginning with a \*(``#\*('' in the first column are treated as comments. |
| 130 | .IP |
| 131 | While comment lines are valid at any point, the output of \fB@CAPTOINFO@\fP |
| 132 | and \fB@INFOTOCAP@\fP (aliases for \fB@TIC@\fP) |
| 133 | will move comments so they occur only between entries. |
| 134 | .PP |
| 135 | Terminal names (except for the last, verbose entry) should |
| 136 | be chosen using the following conventions. |
| 137 | The particular piece of hardware making up the terminal should |
| 138 | have a root name, thus \*(``hp2621\*(''. |
| 139 | This name should not contain hyphens. |
| 140 | Modes that the hardware can be in, or user preferences, should |
| 141 | be indicated by appending a hyphen and a mode suffix. |
| 142 | Thus, a vt100 in 132-column mode would be vt100\-w. |
| 143 | The following suffixes should be used where possible: |
| 144 | .PP |
| 145 | .TS |
| 146 | center; |
| 147 | Lb Lb Lb |
| 148 | L L Lx. |
| 149 | Suffix Example Meaning |
| 150 | _ |
| 151 | \-\fInn\fP aaa\-60 Number of lines on the screen |
| 152 | \-\fIn\fPp c100\-4p Number of pages of memory |
| 153 | \-am vt100\-am With automargins (usually the default) |
| 154 | \-m ansi\-m Mono mode; suppress color |
| 155 | \-mc wy30\-mc Magic cookie; spaces when highlighting |
| 156 | \-na c100\-na No arrow keys (leave them in local) |
| 157 | \-nam vt100\-nam Without automatic margins |
| 158 | \-nl hp2621\-nl No status line |
| 159 | \-ns hp2626\-ns No status line |
| 160 | \-rv c100\-rv Reverse video |
| 161 | \-s vt100\-s Enable status line |
| 162 | \-vb wy370\-vb Use visible bell instead of beep |
| 163 | \-w vt100\-w Wide mode (> 80 columns, usually 132) |
| 164 | .TE |
| 165 | .PP |
| 166 | For more on terminal naming conventions, see the \fBterm\fP(7) manual page. |
| 167 | .SS "\fIterminfo\fP Capabilities Syntax" |
| 168 | The terminfo entry consists of several \fIcapabilities\fP, |
| 169 | i.e., features that the terminal has, |
| 170 | or methods for exercising the terminal's features. |
| 171 | .PP |
| 172 | After the first field (giving the name(s) of the terminal entry), |
| 173 | there should be one or more \fIcapability\fP fields. |
| 174 | These are Boolean, numeric or string names with corresponding values: |
| 175 | .bP |
| 176 | Boolean capabilities are true when present, false when absent. |
| 177 | There is no explicit value for Boolean capabilities. |
| 178 | .bP |
| 179 | Numeric capabilities have a \*(``#\*('' following the name, |
| 180 | then an unsigned decimal integer value. |
| 181 | .bP |
| 182 | String capabilities have a \*(``=\*('' following the name, |
| 183 | then an string of characters making up the capability value. |
| 184 | .IP |
| 185 | String capabilities can be split into multiple lines, |
| 186 | just as the fields comprising a terminal entry can be |
| 187 | split into multiple lines. |
| 188 | While blanks between fields are ignored, |
| 189 | blanks embedded within a string value are retained, |
| 190 | except for leading blanks on a line. |
| 191 | .PP |
| 192 | Any capability can be \fIcanceled\fP, |
| 193 | i.e., suppressed from the terminal entry, |
| 194 | by following its name with \*(``@\*('' |
| 195 | rather than a capability value. |
| 196 | .SS "Similar Terminals" |
| 197 | If there are two very similar terminals, one (the variant) can be defined as |
| 198 | being just like the other (the base) with certain exceptions. |
| 199 | In the |
| 200 | definition of the variant, the string capability \fBuse\fP can be given with |
| 201 | the name of the base terminal: |
| 202 | .bP |
| 203 | The capabilities given before |
| 204 | .B use |
| 205 | override those in the base type named by |
| 206 | .BR use . |
| 207 | .bP |
| 208 | If there are multiple \fBuse\fP capabilities, they are merged in reverse order. |
| 209 | That is, the rightmost \fBuse\fP reference is processed first, then the one to |
| 210 | its left, and so forth. |
| 211 | .bP |
| 212 | Capabilities given explicitly in the entry override |
| 213 | those brought in by \fBuse\fP references. |
| 214 | .PP |
| 215 | A capability can be canceled by placing \fBxx@\fP to the left of the |
| 216 | use reference that imports it, where \fIxx\fP is the capability. |
| 217 | For example, the entry |
| 218 | .RS |
| 219 | .PP |
| 220 | 2621\-nl, smkx@, rmkx@, use=2621, |
| 221 | .RE |
| 222 | .PP |
| 223 | defines a 2621\-nl that does not have the \fBsmkx\fP or \fBrmkx\fP capabilities, |
| 224 | and hence does not turn on the function key labels when in visual mode. |
| 225 | This is useful for different modes for a terminal, or for different |
| 226 | user preferences. |
| 227 | .PP |
| 228 | An entry included via \fBuse\fP can contain canceled capabilities, |
| 229 | which have the same effect as if those cancels were inline in the |
| 230 | using terminal entry. |
| 231 | .SS "Predefined Capabilities" |
| 232 | .\" Head of terminfo man page ends here |
| 233 | .ps -1 |
| 234 | Tables of capabilities |
| 235 | .I \%ncurses |
| 236 | recognizes in a |
| 237 | .I \%term\%info |
| 238 | terminal type description and available to |
| 239 | .IR \%term\%info -using |
| 240 | code follow. |
| 241 | .bP |
| 242 | The capability name identifies the symbol by which the programmer |
| 243 | using the |
| 244 | .I \%term\%info |
| 245 | API accesses the capability. |
| 246 | .bP |
| 247 | The TI |
| 248 | .RI ( \%term\%info ) |
| 249 | code is the short name used by a person composing or updating a |
| 250 | terminal type entry. |
| 251 | .IP |
| 252 | Whenever possible, |
| 253 | these codes are the same as or similar to those of the ANSI X3.64-1979 |
| 254 | standard |
| 255 | (now superseded by ECMA-48, |
| 256 | which uses identical or very similar names). |
| 257 | Semantics are also intended to match those of the specification. |
| 258 | .IP |
| 259 | .I \%term\%info |
| 260 | codes have no hard length limit, |
| 261 | but |
| 262 | .I \%ncurses |
| 263 | maintains an informal one of 5 characters to keep them short and to |
| 264 | allow the tabs in the source file |
| 265 | .I Caps |
| 266 | to line up nicely. |
| 267 | (Some standard codes exceed this limit regardless.) |
| 268 | .bP |
| 269 | The TC |
| 270 | .RI ( termcap ) |
| 271 | code is that used by the corresponding API of |
| 272 | .IR \%ncurses . |
| 273 | (Some capabilities are new, |
| 274 | and have names that BSD |
| 275 | .I termcap |
| 276 | did not originate.) |
| 277 | .bP |
| 278 | The description field attempts to convey the capability's semantics. |
| 279 | .PP |
| 280 | The description field employs a handful of notations. |
| 281 | .TP |
| 282 | .B (P) |
| 283 | indicates that padding may be specified. |
| 284 | .TP |
| 285 | .B (P*) |
| 286 | indicates that padding may vary in proportion to the number of output |
| 287 | lines affected. |
| 288 | .TP |
| 289 | .BI # i |
| 290 | indicates the |
| 291 | .IR i th |
| 292 | parameter of a string capability; |
| 293 | the programmer should pass the string to \fB\%tparm\fP(3X) with the |
| 294 | parameters listed. |
| 295 | .IP |
| 296 | If the description lists no parameters, |
| 297 | passing the string to \fB\%tparm\fP(3X) may produce unexpected |
| 298 | behavior, |
| 299 | for instance if the string contains percent signs. |
| 300 | . |
| 301 | .PP |
| 302 | .TS |
| 303 | center; |
| 304 | Lb Cb S Lb |
| 305 | Lb Lb Lb Lb |
| 306 | Lbw(25n)2 Lbw(8n)2 Lb2 Lx. |
| 307 | \& Code \& |
| 308 | Boolean Capability Name TI TC Description |
| 309 | _ |
| 310 | auto_left_margin bw bw T{ |
| 311 | .ad l |
| 312 | cub1 wraps from column 0 to last column |
| 313 | T} |
| 314 | auto_right_margin am am T{ |
| 315 | .ad l |
| 316 | terminal has automatic margins |
| 317 | T} |
| 318 | no_esc_ctlc xsb xb T{ |
| 319 | .ad l |
| 320 | beehive (f1=escape, f2=ctrl C) |
| 321 | T} |
| 322 | ceol_standout_glitch xhp xs T{ |
| 323 | .ad l |
| 324 | standout not erased by overwriting (hp) |
| 325 | T} |
| 326 | eat_newline_glitch xenl xn T{ |
| 327 | .ad l |
| 328 | newline ignored after 80 cols (concept) |
| 329 | T} |
| 330 | erase_overstrike eo eo T{ |
| 331 | .ad l |
| 332 | can erase overstrikes with a blank |
| 333 | T} |
| 334 | generic_type gn gn T{ |
| 335 | .ad l |
| 336 | generic line type |
| 337 | T} |
| 338 | hard_copy hc hc T{ |
| 339 | .ad l |
| 340 | hardcopy terminal |
| 341 | T} |
| 342 | has_meta_key km km T{ |
| 343 | .ad l |
| 344 | Has a meta key (i.e., sets 8th-bit) |
| 345 | T} |
| 346 | has_status_line hs hs T{ |
| 347 | .ad l |
| 348 | has extra status line |
| 349 | T} |
| 350 | insert_null_glitch in in T{ |
| 351 | .ad l |
| 352 | insert mode distinguishes nulls |
| 353 | T} |
| 354 | memory_above da da T{ |
| 355 | .ad l |
| 356 | display may be retained above the screen |
| 357 | T} |
| 358 | memory_below db db T{ |
| 359 | .ad l |
| 360 | display may be retained below the screen |
| 361 | T} |
| 362 | move_insert_mode mir mi T{ |
| 363 | .ad l |
| 364 | safe to move while in insert mode |
| 365 | T} |
| 366 | move_standout_mode msgr ms T{ |
| 367 | .ad l |
| 368 | safe to move while in standout mode |
| 369 | T} |
| 370 | over_strike os os T{ |
| 371 | .ad l |
| 372 | terminal can overstrike |
| 373 | T} |
| 374 | status_line_esc_ok eslok es T{ |
| 375 | .ad l |
| 376 | escape can be used on the status line |
| 377 | T} |
| 378 | dest_tabs_magic_smso xt xt T{ |
| 379 | .ad l |
| 380 | tabs destructive, magic so char (t1061) |
| 381 | T} |
| 382 | tilde_glitch hz hz T{ |
| 383 | .ad l |
| 384 | cannot print ~'s (Hazeltine) |
| 385 | T} |
| 386 | transparent_underline ul ul T{ |
| 387 | .ad l |
| 388 | underline character overstrikes |
| 389 | T} |
| 390 | xon_xoff xon xo T{ |
| 391 | .ad l |
| 392 | terminal uses xon/xoff handshaking |
| 393 | T} |
| 394 | needs_xon_xoff nxon nx T{ |
| 395 | .ad l |
| 396 | padding will not work, xon/xoff required |
| 397 | T} |
| 398 | prtr_silent mc5i 5i T{ |
| 399 | .ad l |
| 400 | printer will not echo on screen |
| 401 | T} |
| 402 | hard_cursor chts HC T{ |
| 403 | .ad l |
| 404 | cursor is hard to see |
| 405 | T} |
| 406 | non_rev_rmcup nrrmc NR T{ |
| 407 | .ad l |
| 408 | smcup does not reverse rmcup |
| 409 | T} |
| 410 | no_pad_char npc NP T{ |
| 411 | .ad l |
| 412 | pad character does not exist |
| 413 | T} |
| 414 | non_dest_scroll_region ndscr ND T{ |
| 415 | .ad l |
| 416 | scrolling region is non-destructive |
| 417 | T} |
| 418 | can_change ccc cc T{ |
| 419 | .ad l |
| 420 | terminal can re-define existing colors |
| 421 | T} |
| 422 | back_color_erase bce ut T{ |
| 423 | .ad l |
| 424 | screen erased with background color |
| 425 | T} |
| 426 | hue_lightness_saturation hls hl T{ |
| 427 | .ad l |
| 428 | terminal uses only HLS color notation (Tektronix) |
| 429 | T} |
| 430 | col_addr_glitch xhpa YA T{ |
| 431 | .ad l |
| 432 | only positive motion for hpa/mhpa caps |
| 433 | T} |
| 434 | cr_cancels_micro_mode crxm YB T{ |
| 435 | .ad l |
| 436 | using cr turns off micro mode |
| 437 | T} |
| 438 | has_print_wheel daisy YC T{ |
| 439 | .ad l |
| 440 | printer needs operator to change character set |
| 441 | T} |
| 442 | row_addr_glitch xvpa YD T{ |
| 443 | .ad l |
| 444 | only positive motion for vpa/mvpa caps |
| 445 | T} |
| 446 | semi_auto_right_margin sam YE T{ |
| 447 | .ad l |
| 448 | printing in last column causes cr |
| 449 | T} |
| 450 | cpi_changes_res cpix YF T{ |
| 451 | .ad l |
| 452 | changing character pitch changes resolution |
| 453 | T} |
| 454 | lpi_changes_res lpix YG T{ |
| 455 | .ad l |
| 456 | changing line pitch changes resolution |
| 457 | T} |
| 458 | .TE |
| 459 | .PP |
| 460 | . |
| 461 | .TS |
| 462 | center; |
| 463 | Lb Cb S Lb |
| 464 | Lb Lb Lb Lb |
| 465 | Lbw(25n)2 Lbw(8n)2 Lb2 Lx. |
| 466 | \& Code \& |
| 467 | Numeric Capability Name TI TC Description |
| 468 | _ |
| 469 | columns cols co T{ |
| 470 | .ad l |
| 471 | number of columns in a line |
| 472 | T} |
| 473 | init_tabs it it T{ |
| 474 | .ad l |
| 475 | tabs initially every # spaces |
| 476 | T} |
| 477 | lines lines li T{ |
| 478 | .ad l |
| 479 | number of lines on screen or page |
| 480 | T} |
| 481 | lines_of_memory lm lm T{ |
| 482 | .ad l |
| 483 | lines of memory if > line. 0 means varies |
| 484 | T} |
| 485 | magic_cookie_glitch xmc sg T{ |
| 486 | .ad l |
| 487 | number of blank characters left by smso or rmso |
| 488 | T} |
| 489 | padding_baud_rate pb pb T{ |
| 490 | .ad l |
| 491 | lowest baud rate where padding needed |
| 492 | T} |
| 493 | virtual_terminal vt vt T{ |
| 494 | .ad l |
| 495 | virtual terminal number (CB/unix) |
| 496 | T} |
| 497 | width_status_line wsl ws T{ |
| 498 | .ad l |
| 499 | number of columns in status line |
| 500 | T} |
| 501 | num_labels nlab Nl T{ |
| 502 | .ad l |
| 503 | number of labels on screen |
| 504 | T} |
| 505 | label_height lh lh T{ |
| 506 | .ad l |
| 507 | rows in each label |
| 508 | T} |
| 509 | label_width lw lw T{ |
| 510 | .ad l |
| 511 | columns in each label |
| 512 | T} |
| 513 | max_attributes ma ma T{ |
| 514 | .ad l |
| 515 | maximum combined attributes terminal can handle |
| 516 | T} |
| 517 | maximum_windows wnum MW T{ |
| 518 | .ad l |
| 519 | maximum number of definable windows |
| 520 | T} |
| 521 | max_colors colors Co T{ |
| 522 | .ad l |
| 523 | maximum number of colors on screen |
| 524 | T} |
| 525 | max_pairs pairs pa T{ |
| 526 | .ad l |
| 527 | maximum number of color-pairs on the screen |
| 528 | T} |
| 529 | no_color_video ncv NC T{ |
| 530 | .ad l |
| 531 | video attributes that cannot be used with colors |
| 532 | T} |
| 533 | .TE |
| 534 | .PP |
| 535 | . |
| 536 | The following numeric capabilities are present in the SVr4.0 term structure, |
| 537 | but are not yet documented in the man page. |
| 538 | They came in with SVr4's printer support. |
| 539 | . |
| 540 | .PP |
| 541 | .TS |
| 542 | center; |
| 543 | Lb Cb S Lb |
| 544 | Lb Lb Lb Lb |
| 545 | Lbw(25n)2 Lbw(8n)2 Lb2 Lx. |
| 546 | \& Code \& |
| 547 | Numeric Capability Name TI TC Description |
| 548 | _ |
| 549 | buffer_capacity bufsz Ya T{ |
| 550 | .ad l |
| 551 | numbers of bytes buffered before printing |
| 552 | T} |
| 553 | dot_vert_spacing spinv Yb T{ |
| 554 | .ad l |
| 555 | spacing of pins vertically in pins per inch |
| 556 | T} |
| 557 | dot_horz_spacing spinh Yc T{ |
| 558 | .ad l |
| 559 | spacing of dots horizontally in dots per inch |
| 560 | T} |
| 561 | max_micro_address maddr Yd T{ |
| 562 | .ad l |
| 563 | maximum value in micro_..._address |
| 564 | T} |
| 565 | max_micro_jump mjump Ye T{ |
| 566 | .ad l |
| 567 | maximum value in parm_..._micro |
| 568 | T} |
| 569 | micro_col_size mcs Yf T{ |
| 570 | .ad l |
| 571 | character step size when in micro mode |
| 572 | T} |
| 573 | micro_line_size mls Yg T{ |
| 574 | .ad l |
| 575 | line step size when in micro mode |
| 576 | T} |
| 577 | number_of_pins npins Yh T{ |
| 578 | .ad l |
| 579 | numbers of pins in print-head |
| 580 | T} |
| 581 | output_res_char orc Yi T{ |
| 582 | .ad l |
| 583 | horizontal resolution in units per line |
| 584 | T} |
| 585 | output_res_line orl Yj T{ |
| 586 | .ad l |
| 587 | vertical resolution in units per line |
| 588 | T} |
| 589 | output_res_horz_inch orhi Yk T{ |
| 590 | .ad l |
| 591 | horizontal resolution in units per inch |
| 592 | T} |
| 593 | output_res_vert_inch orvi Yl T{ |
| 594 | .ad l |
| 595 | vertical resolution in units per inch |
| 596 | T} |
| 597 | print_rate cps Ym T{ |
| 598 | .ad l |
| 599 | print rate in characters per second |
| 600 | T} |
| 601 | wide_char_size widcs Yn T{ |
| 602 | .ad l |
| 603 | character step size when in double wide mode |
| 604 | T} |
| 605 | buttons btns BT T{ |
| 606 | .ad l |
| 607 | number of buttons on mouse |
| 608 | T} |
| 609 | bit_image_entwining bitwin Yo T{ |
| 610 | .ad l |
| 611 | number of passes for each bit-image row |
| 612 | T} |
| 613 | bit_image_type bitype Yp T{ |
| 614 | .ad l |
| 615 | type of bit-image device |
| 616 | T} |
| 617 | .TE |
| 618 | .PP |
| 619 | . |
| 620 | .TS |
| 621 | center; |
| 622 | Lb Cb S Lb |
| 623 | Lb Lb Lb Lb |
| 624 | Lbw(25n)2 Lbw(8n)2 Lb2 Lx. |
| 625 | \& Code \& |
| 626 | String Capability Name TI TC Description |
| 627 | _ |
| 628 | back_tab cbt bt T{ |
| 629 | .ad l |
| 630 | back tab (P) |
| 631 | T} |
| 632 | bell bel bl T{ |
| 633 | .ad l |
| 634 | audible signal (bell) (P) |
| 635 | T} |
| 636 | carriage_return cr cr T{ |
| 637 | .ad l |
| 638 | carriage return (P*) (P*) |
| 639 | T} |
| 640 | change_scroll_region csr cs T{ |
| 641 | .ad l |
| 642 | change region to line #1 to line #2 (P) |
| 643 | T} |
| 644 | clear_all_tabs tbc ct T{ |
| 645 | .ad l |
| 646 | clear all tab stops (P) |
| 647 | T} |
| 648 | clear_screen clear cl T{ |
| 649 | .ad l |
| 650 | clear screen and home cursor (P*) |
| 651 | T} |
| 652 | clr_eol el ce T{ |
| 653 | .ad l |
| 654 | clear to end of line (P) |
| 655 | T} |
| 656 | clr_eos ed cd T{ |
| 657 | .ad l |
| 658 | clear to end of screen (P*) |
| 659 | T} |
| 660 | column_address hpa ch T{ |
| 661 | .ad l |
| 662 | horizontal position #1, absolute (P) |
| 663 | T} |
| 664 | command_character cmdch CC T{ |
| 665 | .ad l |
| 666 | terminal settable cmd character in prototype !? |
| 667 | T} |
| 668 | cursor_address cup cm T{ |
| 669 | .ad l |
| 670 | move to row #1 columns #2 |
| 671 | T} |
| 672 | cursor_down cud1 do T{ |
| 673 | .ad l |
| 674 | down one line |
| 675 | T} |
| 676 | cursor_home home ho T{ |
| 677 | .ad l |
| 678 | home cursor (if no cup) |
| 679 | T} |
| 680 | cursor_invisible civis vi T{ |
| 681 | .ad l |
| 682 | make cursor invisible |
| 683 | T} |
| 684 | cursor_left cub1 le T{ |
| 685 | .ad l |
| 686 | move left one space |
| 687 | T} |
| 688 | cursor_mem_address mrcup CM T{ |
| 689 | .ad l |
| 690 | memory relative cursor addressing, move to row #1 columns #2 |
| 691 | T} |
| 692 | cursor_normal cnorm ve T{ |
| 693 | .ad l |
| 694 | make cursor appear normal (undo civis/cvvis) |
| 695 | T} |
| 696 | cursor_right cuf1 nd T{ |
| 697 | .ad l |
| 698 | non-destructive space (move right one space) |
| 699 | T} |
| 700 | cursor_to_ll ll ll T{ |
| 701 | .ad l |
| 702 | last line, first column (if no cup) |
| 703 | T} |
| 704 | cursor_up cuu1 up T{ |
| 705 | .ad l |
| 706 | up one line |
| 707 | T} |
| 708 | cursor_visible cvvis vs T{ |
| 709 | .ad l |
| 710 | make cursor very visible |
| 711 | T} |
| 712 | delete_character dch1 dc T{ |
| 713 | .ad l |
| 714 | delete character (P*) |
| 715 | T} |
| 716 | delete_line dl1 dl T{ |
| 717 | .ad l |
| 718 | delete line (P*) |
| 719 | T} |
| 720 | dis_status_line dsl ds T{ |
| 721 | .ad l |
| 722 | disable status line |
| 723 | T} |
| 724 | down_half_line hd hd T{ |
| 725 | .ad l |
| 726 | half a line down |
| 727 | T} |
| 728 | enter_alt_charset_mode smacs as T{ |
| 729 | .ad l |
| 730 | start alternate character set (P) |
| 731 | T} |
| 732 | enter_blink_mode blink mb T{ |
| 733 | .ad l |
| 734 | turn on blinking |
| 735 | T} |
| 736 | enter_bold_mode bold md T{ |
| 737 | .ad l |
| 738 | turn on bold (extra bright) mode |
| 739 | T} |
| 740 | enter_ca_mode smcup ti T{ |
| 741 | .ad l |
| 742 | string to start programs using cup |
| 743 | T} |
| 744 | enter_delete_mode smdc dm T{ |
| 745 | .ad l |
| 746 | enter delete mode |
| 747 | T} |
| 748 | enter_dim_mode dim mh T{ |
| 749 | .ad l |
| 750 | turn on half-bright mode |
| 751 | T} |
| 752 | enter_insert_mode smir im T{ |
| 753 | .ad l |
| 754 | enter insert mode |
| 755 | T} |
| 756 | enter_secure_mode invis mk T{ |
| 757 | .ad l |
| 758 | turn on blank mode (characters invisible) |
| 759 | T} |
| 760 | enter_protected_mode prot mp T{ |
| 761 | .ad l |
| 762 | turn on protected mode |
| 763 | T} |
| 764 | enter_reverse_mode rev mr T{ |
| 765 | .ad l |
| 766 | turn on reverse video mode |
| 767 | T} |
| 768 | enter_standout_mode smso so T{ |
| 769 | .ad l |
| 770 | begin standout mode |
| 771 | T} |
| 772 | enter_underline_mode smul us T{ |
| 773 | .ad l |
| 774 | begin underline mode |
| 775 | T} |
| 776 | erase_chars ech ec T{ |
| 777 | .ad l |
| 778 | erase #1 characters (P) |
| 779 | T} |
| 780 | exit_alt_charset_mode rmacs ae T{ |
| 781 | .ad l |
| 782 | end alternate character set (P) |
| 783 | T} |
| 784 | exit_attribute_mode sgr0 me T{ |
| 785 | .ad l |
| 786 | turn off all attributes |
| 787 | T} |
| 788 | exit_ca_mode rmcup te T{ |
| 789 | .ad l |
| 790 | strings to end programs using cup |
| 791 | T} |
| 792 | exit_delete_mode rmdc ed T{ |
| 793 | .ad l |
| 794 | end delete mode |
| 795 | T} |
| 796 | exit_insert_mode rmir ei T{ |
| 797 | .ad l |
| 798 | exit insert mode |
| 799 | T} |
| 800 | exit_standout_mode rmso se T{ |
| 801 | .ad l |
| 802 | exit standout mode |
| 803 | T} |
| 804 | exit_underline_mode rmul ue T{ |
| 805 | .ad l |
| 806 | exit underline mode |
| 807 | T} |
| 808 | flash_screen flash vb T{ |
| 809 | .ad l |
| 810 | visible bell (may not move cursor) |
| 811 | T} |
| 812 | form_feed ff ff T{ |
| 813 | .ad l |
| 814 | hardcopy terminal page eject (P*) |
| 815 | T} |
| 816 | from_status_line fsl fs T{ |
| 817 | .ad l |
| 818 | return from status line |
| 819 | T} |
| 820 | init_1string is1 i1 T{ |
| 821 | .ad l |
| 822 | initialization string |
| 823 | T} |
| 824 | init_2string is2 is T{ |
| 825 | .ad l |
| 826 | initialization string |
| 827 | T} |
| 828 | init_3string is3 i3 T{ |
| 829 | .ad l |
| 830 | initialization string |
| 831 | T} |
| 832 | init_file if if T{ |
| 833 | .ad l |
| 834 | name of initialization file |
| 835 | T} |
| 836 | insert_character ich1 ic T{ |
| 837 | .ad l |
| 838 | insert character (P) |
| 839 | T} |
| 840 | insert_line il1 al T{ |
| 841 | .ad l |
| 842 | insert line (P*) |
| 843 | T} |
| 844 | insert_padding ip ip T{ |
| 845 | .ad l |
| 846 | insert padding after inserted character |
| 847 | T} |
| 848 | key_backspace kbs kb T{ |
| 849 | .ad l |
| 850 | backspace key |
| 851 | T} |
| 852 | key_catab ktbc ka T{ |
| 853 | .ad l |
| 854 | clear-all-tabs key |
| 855 | T} |
| 856 | key_clear kclr kC T{ |
| 857 | .ad l |
| 858 | clear-screen or erase key |
| 859 | T} |
| 860 | key_ctab kctab kt T{ |
| 861 | .ad l |
| 862 | clear-tab key |
| 863 | T} |
| 864 | key_dc kdch1 kD T{ |
| 865 | .ad l |
| 866 | delete-character key |
| 867 | T} |
| 868 | key_dl kdl1 kL T{ |
| 869 | .ad l |
| 870 | delete-line key |
| 871 | T} |
| 872 | key_down kcud1 kd T{ |
| 873 | .ad l |
| 874 | down-arrow key |
| 875 | T} |
| 876 | .TE |
| 877 | .TS |
| 878 | center; |
| 879 | Lbw(25n)2 Lbw(8n)2 Lb2 Lx. |
| 880 | key_eic krmir kM T{ |
| 881 | .ad l |
| 882 | sent by rmir or smir in insert mode |
| 883 | T} |
| 884 | key_eol kel kE T{ |
| 885 | .ad l |
| 886 | clear-to-end-of-line key |
| 887 | T} |
| 888 | key_eos ked kS T{ |
| 889 | .ad l |
| 890 | clear-to-end-of-screen key |
| 891 | T} |
| 892 | key_f0 kf0 k0 T{ |
| 893 | .ad l |
| 894 | F0 function key |
| 895 | T} |
| 896 | key_f1 kf1 k1 T{ |
| 897 | .ad l |
| 898 | F1 function key |
| 899 | T} |
| 900 | key_f10 kf10 k; T{ |
| 901 | .ad l |
| 902 | F10 function key |
| 903 | T} |
| 904 | key_f2 kf2 k2 T{ |
| 905 | .ad l |
| 906 | F2 function key |
| 907 | T} |
| 908 | key_f3 kf3 k3 T{ |
| 909 | .ad l |
| 910 | F3 function key |
| 911 | T} |
| 912 | key_f4 kf4 k4 T{ |
| 913 | .ad l |
| 914 | F4 function key |
| 915 | T} |
| 916 | key_f5 kf5 k5 T{ |
| 917 | .ad l |
| 918 | F5 function key |
| 919 | T} |
| 920 | key_f6 kf6 k6 T{ |
| 921 | .ad l |
| 922 | F6 function key |
| 923 | T} |
| 924 | key_f7 kf7 k7 T{ |
| 925 | .ad l |
| 926 | F7 function key |
| 927 | T} |
| 928 | key_f8 kf8 k8 T{ |
| 929 | .ad l |
| 930 | F8 function key |
| 931 | T} |
| 932 | key_f9 kf9 k9 T{ |
| 933 | .ad l |
| 934 | F9 function key |
| 935 | T} |
| 936 | key_home khome kh T{ |
| 937 | .ad l |
| 938 | home key |
| 939 | T} |
| 940 | key_ic kich1 kI T{ |
| 941 | .ad l |
| 942 | insert-character key |
| 943 | T} |
| 944 | key_il kil1 kA T{ |
| 945 | .ad l |
| 946 | insert-line key |
| 947 | T} |
| 948 | key_left kcub1 kl T{ |
| 949 | .ad l |
| 950 | left-arrow key |
| 951 | T} |
| 952 | key_ll kll kH T{ |
| 953 | .ad l |
| 954 | lower-left key (home down) |
| 955 | T} |
| 956 | key_npage knp kN T{ |
| 957 | .ad l |
| 958 | next-page key |
| 959 | T} |
| 960 | key_ppage kpp kP T{ |
| 961 | .ad l |
| 962 | previous-page key |
| 963 | T} |
| 964 | key_right kcuf1 kr T{ |
| 965 | .ad l |
| 966 | right-arrow key |
| 967 | T} |
| 968 | key_sf kind kF T{ |
| 969 | .ad l |
| 970 | scroll-forward key |
| 971 | T} |
| 972 | key_sr kri kR T{ |
| 973 | .ad l |
| 974 | scroll-backward key |
| 975 | T} |
| 976 | key_stab khts kT T{ |
| 977 | .ad l |
| 978 | set-tab key |
| 979 | T} |
| 980 | key_up kcuu1 ku T{ |
| 981 | .ad l |
| 982 | up-arrow key |
| 983 | T} |
| 984 | keypad_local rmkx ke T{ |
| 985 | .ad l |
| 986 | leave keyboard transmit mode |
| 987 | T} |
| 988 | keypad_xmit smkx ks T{ |
| 989 | .ad l |
| 990 | enter keyboard transmit mode |
| 991 | T} |
| 992 | lab_f0 lf0 l0 T{ |
| 993 | .ad l |
| 994 | label on function key f0 if not f0 |
| 995 | T} |
| 996 | lab_f1 lf1 l1 T{ |
| 997 | .ad l |
| 998 | label on function key f1 if not f1 |
| 999 | T} |
| 1000 | lab_f10 lf10 la T{ |
| 1001 | .ad l |
| 1002 | label on function key f10 if not f10 |
| 1003 | T} |
| 1004 | lab_f2 lf2 l2 T{ |
| 1005 | .ad l |
| 1006 | label on function key f2 if not f2 |
| 1007 | T} |
| 1008 | lab_f3 lf3 l3 T{ |
| 1009 | .ad l |
| 1010 | label on function key f3 if not f3 |
| 1011 | T} |
| 1012 | lab_f4 lf4 l4 T{ |
| 1013 | .ad l |
| 1014 | label on function key f4 if not f4 |
| 1015 | T} |
| 1016 | lab_f5 lf5 l5 T{ |
| 1017 | .ad l |
| 1018 | label on function key f5 if not f5 |
| 1019 | T} |
| 1020 | lab_f6 lf6 l6 T{ |
| 1021 | .ad l |
| 1022 | label on function key f6 if not f6 |
| 1023 | T} |
| 1024 | lab_f7 lf7 l7 T{ |
| 1025 | .ad l |
| 1026 | label on function key f7 if not f7 |
| 1027 | T} |
| 1028 | lab_f8 lf8 l8 T{ |
| 1029 | .ad l |
| 1030 | label on function key f8 if not f8 |
| 1031 | T} |
| 1032 | lab_f9 lf9 l9 T{ |
| 1033 | .ad l |
| 1034 | label on function key f9 if not f9 |
| 1035 | T} |
| 1036 | meta_off rmm mo T{ |
| 1037 | .ad l |
| 1038 | turn off meta mode |
| 1039 | T} |
| 1040 | meta_on smm mm T{ |
| 1041 | .ad l |
| 1042 | turn on meta mode (8th-bit on) |
| 1043 | T} |
| 1044 | newline nel nw T{ |
| 1045 | .ad l |
| 1046 | newline (behave like cr followed by lf) |
| 1047 | T} |
| 1048 | pad_char pad pc T{ |
| 1049 | .ad l |
| 1050 | padding char (instead of null) |
| 1051 | T} |
| 1052 | parm_dch dch DC T{ |
| 1053 | .ad l |
| 1054 | delete #1 characters (P*) |
| 1055 | T} |
| 1056 | parm_delete_line dl DL T{ |
| 1057 | .ad l |
| 1058 | delete #1 lines (P*) |
| 1059 | T} |
| 1060 | parm_down_cursor cud DO T{ |
| 1061 | .ad l |
| 1062 | down #1 lines (P*) |
| 1063 | T} |
| 1064 | parm_ich ich IC T{ |
| 1065 | .ad l |
| 1066 | insert #1 characters (P*) |
| 1067 | T} |
| 1068 | parm_index indn SF T{ |
| 1069 | .ad l |
| 1070 | scroll forward #1 lines (P) |
| 1071 | T} |
| 1072 | parm_insert_line il AL T{ |
| 1073 | .ad l |
| 1074 | insert #1 lines (P*) |
| 1075 | T} |
| 1076 | parm_left_cursor cub LE T{ |
| 1077 | .ad l |
| 1078 | move #1 characters to the left (P) |
| 1079 | T} |
| 1080 | parm_right_cursor cuf RI T{ |
| 1081 | .ad l |
| 1082 | move #1 characters to the right (P*) |
| 1083 | T} |
| 1084 | parm_rindex rin SR T{ |
| 1085 | .ad l |
| 1086 | scroll back #1 lines (P) |
| 1087 | T} |
| 1088 | parm_up_cursor cuu UP T{ |
| 1089 | .ad l |
| 1090 | up #1 lines (P*) |
| 1091 | T} |
| 1092 | pkey_key pfkey pk T{ |
| 1093 | .ad l |
| 1094 | program function key #1 to type string #2 |
| 1095 | T} |
| 1096 | pkey_local pfloc pl T{ |
| 1097 | .ad l |
| 1098 | program function key #1 to execute string #2 |
| 1099 | T} |
| 1100 | pkey_xmit pfx px T{ |
| 1101 | .ad l |
| 1102 | program function key #1 to transmit string #2 |
| 1103 | T} |
| 1104 | print_screen mc0 ps T{ |
| 1105 | .ad l |
| 1106 | print contents of screen |
| 1107 | T} |
| 1108 | prtr_off mc4 pf T{ |
| 1109 | .ad l |
| 1110 | turn off printer |
| 1111 | T} |
| 1112 | prtr_on mc5 po T{ |
| 1113 | .ad l |
| 1114 | turn on printer |
| 1115 | T} |
| 1116 | repeat_char rep rp T{ |
| 1117 | .ad l |
| 1118 | repeat char #1 #2 times (P*) |
| 1119 | T} |
| 1120 | reset_1string rs1 r1 T{ |
| 1121 | .ad l |
| 1122 | reset string |
| 1123 | T} |
| 1124 | reset_2string rs2 r2 T{ |
| 1125 | .ad l |
| 1126 | reset string |
| 1127 | T} |
| 1128 | .TE |
| 1129 | .TS |
| 1130 | center; |
| 1131 | Lbw(25n)2 Lbw(8n)2 Lb2 Lx. |
| 1132 | reset_3string rs3 r3 T{ |
| 1133 | .ad l |
| 1134 | reset string |
| 1135 | T} |
| 1136 | reset_file rf rf T{ |
| 1137 | .ad l |
| 1138 | name of reset file |
| 1139 | T} |
| 1140 | restore_cursor rc rc T{ |
| 1141 | .ad l |
| 1142 | restore cursor to position of last save_cursor |
| 1143 | T} |
| 1144 | row_address vpa cv T{ |
| 1145 | .ad l |
| 1146 | vertical position #1 absolute (P) |
| 1147 | T} |
| 1148 | save_cursor sc sc T{ |
| 1149 | .ad l |
| 1150 | save current cursor position (P) |
| 1151 | T} |
| 1152 | scroll_forward ind sf T{ |
| 1153 | .ad l |
| 1154 | scroll text up (P) |
| 1155 | T} |
| 1156 | scroll_reverse ri sr T{ |
| 1157 | .ad l |
| 1158 | scroll text down (P) |
| 1159 | T} |
| 1160 | set_attributes sgr sa T{ |
| 1161 | .ad l |
| 1162 | define video attributes #1-#9 (PG9) |
| 1163 | T} |
| 1164 | set_tab hts st T{ |
| 1165 | .ad l |
| 1166 | set a tab in every row, current columns |
| 1167 | T} |
| 1168 | set_window wind wi T{ |
| 1169 | .ad l |
| 1170 | current window is lines #1-#2 cols #3-#4 |
| 1171 | T} |
| 1172 | tab ht ta T{ |
| 1173 | .ad l |
| 1174 | tab to next 8-space hardware tab stop |
| 1175 | T} |
| 1176 | to_status_line tsl ts T{ |
| 1177 | .ad l |
| 1178 | move to status line, column #1 |
| 1179 | T} |
| 1180 | underline_char uc uc T{ |
| 1181 | .ad l |
| 1182 | underline char and move past it |
| 1183 | T} |
| 1184 | up_half_line hu hu T{ |
| 1185 | .ad l |
| 1186 | half a line up |
| 1187 | T} |
| 1188 | init_prog iprog iP T{ |
| 1189 | .ad l |
| 1190 | path name of program for initialization |
| 1191 | T} |
| 1192 | key_a1 ka1 K1 T{ |
| 1193 | .ad l |
| 1194 | upper left of keypad |
| 1195 | T} |
| 1196 | key_a3 ka3 K3 T{ |
| 1197 | .ad l |
| 1198 | upper right of keypad |
| 1199 | T} |
| 1200 | key_b2 kb2 K2 T{ |
| 1201 | .ad l |
| 1202 | center of keypad |
| 1203 | T} |
| 1204 | key_c1 kc1 K4 T{ |
| 1205 | .ad l |
| 1206 | lower left of keypad |
| 1207 | T} |
| 1208 | key_c3 kc3 K5 T{ |
| 1209 | .ad l |
| 1210 | lower right of keypad |
| 1211 | T} |
| 1212 | prtr_non mc5p pO T{ |
| 1213 | .ad l |
| 1214 | turn on printer for #1 bytes |
| 1215 | T} |
| 1216 | char_padding rmp rP T{ |
| 1217 | .ad l |
| 1218 | like ip but when in insert mode |
| 1219 | T} |
| 1220 | acs_chars acsc ac T{ |
| 1221 | .ad l |
| 1222 | graphics charset pairs, based on vt100 |
| 1223 | T} |
| 1224 | plab_norm pln pn T{ |
| 1225 | .ad l |
| 1226 | program label #1 to show string #2 |
| 1227 | T} |
| 1228 | key_btab kcbt kB T{ |
| 1229 | .ad l |
| 1230 | back-tab key |
| 1231 | T} |
| 1232 | enter_xon_mode smxon SX T{ |
| 1233 | .ad l |
| 1234 | turn on xon/xoff handshaking |
| 1235 | T} |
| 1236 | exit_xon_mode rmxon RX T{ |
| 1237 | .ad l |
| 1238 | turn off xon/xoff handshaking |
| 1239 | T} |
| 1240 | enter_am_mode smam SA T{ |
| 1241 | .ad l |
| 1242 | turn on automatic margins |
| 1243 | T} |
| 1244 | exit_am_mode rmam RA T{ |
| 1245 | .ad l |
| 1246 | turn off automatic margins |
| 1247 | T} |
| 1248 | xon_character xonc XN T{ |
| 1249 | .ad l |
| 1250 | XON character |
| 1251 | T} |
| 1252 | xoff_character xoffc XF T{ |
| 1253 | .ad l |
| 1254 | XOFF character |
| 1255 | T} |
| 1256 | ena_acs enacs eA T{ |
| 1257 | .ad l |
| 1258 | enable alternate char set |
| 1259 | T} |
| 1260 | label_on smln LO T{ |
| 1261 | .ad l |
| 1262 | turn on soft labels |
| 1263 | T} |
| 1264 | label_off rmln LF T{ |
| 1265 | .ad l |
| 1266 | turn off soft labels |
| 1267 | T} |
| 1268 | key_beg kbeg @1 T{ |
| 1269 | .ad l |
| 1270 | begin key |
| 1271 | T} |
| 1272 | key_cancel kcan @2 T{ |
| 1273 | .ad l |
| 1274 | cancel key |
| 1275 | T} |
| 1276 | key_close kclo @3 T{ |
| 1277 | .ad l |
| 1278 | close key |
| 1279 | T} |
| 1280 | key_command kcmd @4 T{ |
| 1281 | .ad l |
| 1282 | command key |
| 1283 | T} |
| 1284 | key_copy kcpy @5 T{ |
| 1285 | .ad l |
| 1286 | copy key |
| 1287 | T} |
| 1288 | key_create kcrt @6 T{ |
| 1289 | .ad l |
| 1290 | create key |
| 1291 | T} |
| 1292 | key_end kend @7 T{ |
| 1293 | .ad l |
| 1294 | end key |
| 1295 | T} |
| 1296 | key_enter kent @8 T{ |
| 1297 | .ad l |
| 1298 | enter/send key |
| 1299 | T} |
| 1300 | key_exit kext @9 T{ |
| 1301 | .ad l |
| 1302 | exit key |
| 1303 | T} |
| 1304 | key_find kfnd @0 T{ |
| 1305 | .ad l |
| 1306 | find key |
| 1307 | T} |
| 1308 | key_help khlp %1 T{ |
| 1309 | .ad l |
| 1310 | help key |
| 1311 | T} |
| 1312 | key_mark kmrk %2 T{ |
| 1313 | .ad l |
| 1314 | mark key |
| 1315 | T} |
| 1316 | key_message kmsg %3 T{ |
| 1317 | .ad l |
| 1318 | message key |
| 1319 | T} |
| 1320 | key_move kmov %4 T{ |
| 1321 | .ad l |
| 1322 | move key |
| 1323 | T} |
| 1324 | key_next knxt %5 T{ |
| 1325 | .ad l |
| 1326 | next key |
| 1327 | T} |
| 1328 | key_open kopn %6 T{ |
| 1329 | .ad l |
| 1330 | open key |
| 1331 | T} |
| 1332 | key_options kopt %7 T{ |
| 1333 | .ad l |
| 1334 | options key |
| 1335 | T} |
| 1336 | key_previous kprv %8 T{ |
| 1337 | .ad l |
| 1338 | previous key |
| 1339 | T} |
| 1340 | key_print kprt %9 T{ |
| 1341 | .ad l |
| 1342 | print key |
| 1343 | T} |
| 1344 | key_redo krdo %0 T{ |
| 1345 | .ad l |
| 1346 | redo key |
| 1347 | T} |
| 1348 | key_reference kref &1 T{ |
| 1349 | .ad l |
| 1350 | reference key |
| 1351 | T} |
| 1352 | key_refresh krfr &2 T{ |
| 1353 | .ad l |
| 1354 | refresh key |
| 1355 | T} |
| 1356 | key_replace krpl &3 T{ |
| 1357 | .ad l |
| 1358 | replace key |
| 1359 | T} |
| 1360 | key_restart krst &4 T{ |
| 1361 | .ad l |
| 1362 | restart key |
| 1363 | T} |
| 1364 | key_resume kres &5 T{ |
| 1365 | .ad l |
| 1366 | resume key |
| 1367 | T} |
| 1368 | key_save ksav &6 T{ |
| 1369 | .ad l |
| 1370 | save key |
| 1371 | T} |
| 1372 | key_suspend kspd &7 T{ |
| 1373 | .ad l |
| 1374 | suspend key |
| 1375 | T} |
| 1376 | key_undo kund &8 T{ |
| 1377 | .ad l |
| 1378 | undo key |
| 1379 | T} |
| 1380 | .TE |
| 1381 | .TS |
| 1382 | center; |
| 1383 | Lbw(25n)2 Lbw(8n)2 Lb2 Lx. |
| 1384 | key_sbeg kBEG &9 T{ |
| 1385 | .ad l |
| 1386 | shifted begin key |
| 1387 | T} |
| 1388 | key_scancel kCAN &0 T{ |
| 1389 | .ad l |
| 1390 | shifted cancel key |
| 1391 | T} |
| 1392 | key_scommand kCMD *1 T{ |
| 1393 | .ad l |
| 1394 | shifted command key |
| 1395 | T} |
| 1396 | key_scopy kCPY *2 T{ |
| 1397 | .ad l |
| 1398 | shifted copy key |
| 1399 | T} |
| 1400 | key_screate kCRT *3 T{ |
| 1401 | .ad l |
| 1402 | shifted create key |
| 1403 | T} |
| 1404 | key_sdc kDC *4 T{ |
| 1405 | .ad l |
| 1406 | shifted delete-character key |
| 1407 | T} |
| 1408 | key_sdl kDL *5 T{ |
| 1409 | .ad l |
| 1410 | shifted delete-line key |
| 1411 | T} |
| 1412 | key_select kslt *6 T{ |
| 1413 | .ad l |
| 1414 | select key |
| 1415 | T} |
| 1416 | key_send kEND *7 T{ |
| 1417 | .ad l |
| 1418 | shifted end key |
| 1419 | T} |
| 1420 | key_seol kEOL *8 T{ |
| 1421 | .ad l |
| 1422 | shifted clear-to-end-of-line key |
| 1423 | T} |
| 1424 | key_sexit kEXT *9 T{ |
| 1425 | .ad l |
| 1426 | shifted exit key |
| 1427 | T} |
| 1428 | key_sfind kFND *0 T{ |
| 1429 | .ad l |
| 1430 | shifted find key |
| 1431 | T} |
| 1432 | key_shelp kHLP #1 T{ |
| 1433 | .ad l |
| 1434 | shifted help key |
| 1435 | T} |
| 1436 | key_shome kHOM #2 T{ |
| 1437 | .ad l |
| 1438 | shifted home key |
| 1439 | T} |
| 1440 | key_sic kIC #3 T{ |
| 1441 | .ad l |
| 1442 | shifted insert-character key |
| 1443 | T} |
| 1444 | key_sleft kLFT #4 T{ |
| 1445 | .ad l |
| 1446 | shifted left-arrow key |
| 1447 | T} |
| 1448 | key_smessage kMSG %a T{ |
| 1449 | .ad l |
| 1450 | shifted message key |
| 1451 | T} |
| 1452 | key_smove kMOV %b T{ |
| 1453 | .ad l |
| 1454 | shifted move key |
| 1455 | T} |
| 1456 | key_snext kNXT %c T{ |
| 1457 | .ad l |
| 1458 | shifted next key |
| 1459 | T} |
| 1460 | key_soptions kOPT %d T{ |
| 1461 | .ad l |
| 1462 | shifted options key |
| 1463 | T} |
| 1464 | key_sprevious kPRV %e T{ |
| 1465 | .ad l |
| 1466 | shifted previous key |
| 1467 | T} |
| 1468 | key_sprint kPRT %f T{ |
| 1469 | .ad l |
| 1470 | shifted print key |
| 1471 | T} |
| 1472 | key_sredo kRDO %g T{ |
| 1473 | .ad l |
| 1474 | shifted redo key |
| 1475 | T} |
| 1476 | key_sreplace kRPL %h T{ |
| 1477 | .ad l |
| 1478 | shifted replace key |
| 1479 | T} |
| 1480 | key_sright kRIT %i T{ |
| 1481 | .ad l |
| 1482 | shifted right-arrow key |
| 1483 | T} |
| 1484 | key_srsume kRES %j T{ |
| 1485 | .ad l |
| 1486 | shifted resume key |
| 1487 | T} |
| 1488 | key_ssave kSAV !1 T{ |
| 1489 | .ad l |
| 1490 | shifted save key |
| 1491 | T} |
| 1492 | key_ssuspend kSPD !2 T{ |
| 1493 | .ad l |
| 1494 | shifted suspend key |
| 1495 | T} |
| 1496 | key_sundo kUND !3 T{ |
| 1497 | .ad l |
| 1498 | shifted undo key |
| 1499 | T} |
| 1500 | req_for_input rfi RF T{ |
| 1501 | .ad l |
| 1502 | send next input char (for ptys) |
| 1503 | T} |
| 1504 | key_f11 kf11 F1 T{ |
| 1505 | .ad l |
| 1506 | F11 function key |
| 1507 | T} |
| 1508 | key_f12 kf12 F2 T{ |
| 1509 | .ad l |
| 1510 | F12 function key |
| 1511 | T} |
| 1512 | key_f13 kf13 F3 T{ |
| 1513 | .ad l |
| 1514 | F13 function key |
| 1515 | T} |
| 1516 | key_f14 kf14 F4 T{ |
| 1517 | .ad l |
| 1518 | F14 function key |
| 1519 | T} |
| 1520 | key_f15 kf15 F5 T{ |
| 1521 | .ad l |
| 1522 | F15 function key |
| 1523 | T} |
| 1524 | key_f16 kf16 F6 T{ |
| 1525 | .ad l |
| 1526 | F16 function key |
| 1527 | T} |
| 1528 | key_f17 kf17 F7 T{ |
| 1529 | .ad l |
| 1530 | F17 function key |
| 1531 | T} |
| 1532 | key_f18 kf18 F8 T{ |
| 1533 | .ad l |
| 1534 | F18 function key |
| 1535 | T} |
| 1536 | key_f19 kf19 F9 T{ |
| 1537 | .ad l |
| 1538 | F19 function key |
| 1539 | T} |
| 1540 | key_f20 kf20 FA T{ |
| 1541 | .ad l |
| 1542 | F20 function key |
| 1543 | T} |
| 1544 | key_f21 kf21 FB T{ |
| 1545 | .ad l |
| 1546 | F21 function key |
| 1547 | T} |
| 1548 | key_f22 kf22 FC T{ |
| 1549 | .ad l |
| 1550 | F22 function key |
| 1551 | T} |
| 1552 | key_f23 kf23 FD T{ |
| 1553 | .ad l |
| 1554 | F23 function key |
| 1555 | T} |
| 1556 | key_f24 kf24 FE T{ |
| 1557 | .ad l |
| 1558 | F24 function key |
| 1559 | T} |
| 1560 | key_f25 kf25 FF T{ |
| 1561 | .ad l |
| 1562 | F25 function key |
| 1563 | T} |
| 1564 | key_f26 kf26 FG T{ |
| 1565 | .ad l |
| 1566 | F26 function key |
| 1567 | T} |
| 1568 | key_f27 kf27 FH T{ |
| 1569 | .ad l |
| 1570 | F27 function key |
| 1571 | T} |
| 1572 | key_f28 kf28 FI T{ |
| 1573 | .ad l |
| 1574 | F28 function key |
| 1575 | T} |
| 1576 | key_f29 kf29 FJ T{ |
| 1577 | .ad l |
| 1578 | F29 function key |
| 1579 | T} |
| 1580 | key_f30 kf30 FK T{ |
| 1581 | .ad l |
| 1582 | F30 function key |
| 1583 | T} |
| 1584 | key_f31 kf31 FL T{ |
| 1585 | .ad l |
| 1586 | F31 function key |
| 1587 | T} |
| 1588 | key_f32 kf32 FM T{ |
| 1589 | .ad l |
| 1590 | F32 function key |
| 1591 | T} |
| 1592 | key_f33 kf33 FN T{ |
| 1593 | .ad l |
| 1594 | F33 function key |
| 1595 | T} |
| 1596 | key_f34 kf34 FO T{ |
| 1597 | .ad l |
| 1598 | F34 function key |
| 1599 | T} |
| 1600 | key_f35 kf35 FP T{ |
| 1601 | .ad l |
| 1602 | F35 function key |
| 1603 | T} |
| 1604 | key_f36 kf36 FQ T{ |
| 1605 | .ad l |
| 1606 | F36 function key |
| 1607 | T} |
| 1608 | key_f37 kf37 FR T{ |
| 1609 | .ad l |
| 1610 | F37 function key |
| 1611 | T} |
| 1612 | key_f38 kf38 FS T{ |
| 1613 | .ad l |
| 1614 | F38 function key |
| 1615 | T} |
| 1616 | key_f39 kf39 FT T{ |
| 1617 | .ad l |
| 1618 | F39 function key |
| 1619 | T} |
| 1620 | key_f40 kf40 FU T{ |
| 1621 | .ad l |
| 1622 | F40 function key |
| 1623 | T} |
| 1624 | key_f41 kf41 FV T{ |
| 1625 | .ad l |
| 1626 | F41 function key |
| 1627 | T} |
| 1628 | key_f42 kf42 FW T{ |
| 1629 | .ad l |
| 1630 | F42 function key |
| 1631 | T} |
| 1632 | .TE |
| 1633 | .TS |
| 1634 | center; |
| 1635 | Lbw(25n)2 Lbw(8n)2 Lb2 Lx. |
| 1636 | key_f43 kf43 FX T{ |
| 1637 | .ad l |
| 1638 | F43 function key |
| 1639 | T} |
| 1640 | key_f44 kf44 FY T{ |
| 1641 | .ad l |
| 1642 | F44 function key |
| 1643 | T} |
| 1644 | key_f45 kf45 FZ T{ |
| 1645 | .ad l |
| 1646 | F45 function key |
| 1647 | T} |
| 1648 | key_f46 kf46 Fa T{ |
| 1649 | .ad l |
| 1650 | F46 function key |
| 1651 | T} |
| 1652 | key_f47 kf47 Fb T{ |
| 1653 | .ad l |
| 1654 | F47 function key |
| 1655 | T} |
| 1656 | key_f48 kf48 Fc T{ |
| 1657 | .ad l |
| 1658 | F48 function key |
| 1659 | T} |
| 1660 | key_f49 kf49 Fd T{ |
| 1661 | .ad l |
| 1662 | F49 function key |
| 1663 | T} |
| 1664 | key_f50 kf50 Fe T{ |
| 1665 | .ad l |
| 1666 | F50 function key |
| 1667 | T} |
| 1668 | key_f51 kf51 Ff T{ |
| 1669 | .ad l |
| 1670 | F51 function key |
| 1671 | T} |
| 1672 | key_f52 kf52 Fg T{ |
| 1673 | .ad l |
| 1674 | F52 function key |
| 1675 | T} |
| 1676 | key_f53 kf53 Fh T{ |
| 1677 | .ad l |
| 1678 | F53 function key |
| 1679 | T} |
| 1680 | key_f54 kf54 Fi T{ |
| 1681 | .ad l |
| 1682 | F54 function key |
| 1683 | T} |
| 1684 | key_f55 kf55 Fj T{ |
| 1685 | .ad l |
| 1686 | F55 function key |
| 1687 | T} |
| 1688 | key_f56 kf56 Fk T{ |
| 1689 | .ad l |
| 1690 | F56 function key |
| 1691 | T} |
| 1692 | key_f57 kf57 Fl T{ |
| 1693 | .ad l |
| 1694 | F57 function key |
| 1695 | T} |
| 1696 | key_f58 kf58 Fm T{ |
| 1697 | .ad l |
| 1698 | F58 function key |
| 1699 | T} |
| 1700 | key_f59 kf59 Fn T{ |
| 1701 | .ad l |
| 1702 | F59 function key |
| 1703 | T} |
| 1704 | key_f60 kf60 Fo T{ |
| 1705 | .ad l |
| 1706 | F60 function key |
| 1707 | T} |
| 1708 | key_f61 kf61 Fp T{ |
| 1709 | .ad l |
| 1710 | F61 function key |
| 1711 | T} |
| 1712 | key_f62 kf62 Fq T{ |
| 1713 | .ad l |
| 1714 | F62 function key |
| 1715 | T} |
| 1716 | key_f63 kf63 Fr T{ |
| 1717 | .ad l |
| 1718 | F63 function key |
| 1719 | T} |
| 1720 | clr_bol el1 cb T{ |
| 1721 | .ad l |
| 1722 | Clear to beginning of line |
| 1723 | T} |
| 1724 | clear_margins mgc MC T{ |
| 1725 | .ad l |
| 1726 | clear right and left soft margins |
| 1727 | T} |
| 1728 | set_left_margin smgl ML T{ |
| 1729 | .ad l |
| 1730 | set left soft margin at current column (not in BSD \fItermcap\fP) |
| 1731 | T} |
| 1732 | set_right_margin smgr MR T{ |
| 1733 | .ad l |
| 1734 | set right soft margin at current column |
| 1735 | T} |
| 1736 | label_format fln Lf T{ |
| 1737 | .ad l |
| 1738 | label format |
| 1739 | T} |
| 1740 | set_clock sclk SC T{ |
| 1741 | .ad l |
| 1742 | set clock, #1 hrs #2 mins #3 secs |
| 1743 | T} |
| 1744 | display_clock dclk DK T{ |
| 1745 | .ad l |
| 1746 | display clock |
| 1747 | T} |
| 1748 | remove_clock rmclk RC T{ |
| 1749 | .ad l |
| 1750 | remove clock |
| 1751 | T} |
| 1752 | create_window cwin CW T{ |
| 1753 | .ad l |
| 1754 | define a window #1 from #2,#3 to #4,#5 |
| 1755 | T} |
| 1756 | goto_window wingo WG T{ |
| 1757 | .ad l |
| 1758 | go to window #1 |
| 1759 | T} |
| 1760 | hangup hup HU T{ |
| 1761 | .ad l |
| 1762 | hang-up phone |
| 1763 | T} |
| 1764 | dial_phone dial DI T{ |
| 1765 | .ad l |
| 1766 | dial number #1 |
| 1767 | T} |
| 1768 | quick_dial qdial QD T{ |
| 1769 | .ad l |
| 1770 | dial number #1 without checking |
| 1771 | T} |
| 1772 | tone tone TO T{ |
| 1773 | .ad l |
| 1774 | select touch tone dialing |
| 1775 | T} |
| 1776 | pulse pulse PU T{ |
| 1777 | .ad l |
| 1778 | select pulse dialing |
| 1779 | T} |
| 1780 | flash_hook hook fh T{ |
| 1781 | .ad l |
| 1782 | flash switch hook |
| 1783 | T} |
| 1784 | fixed_pause pause PA T{ |
| 1785 | .ad l |
| 1786 | pause for 2-3 seconds |
| 1787 | T} |
| 1788 | wait_tone wait WA T{ |
| 1789 | .ad l |
| 1790 | wait for dial-tone |
| 1791 | T} |
| 1792 | user0 u0 u0 T{ |
| 1793 | .ad l |
| 1794 | User string #0 |
| 1795 | T} |
| 1796 | user1 u1 u1 T{ |
| 1797 | .ad l |
| 1798 | User string #1 |
| 1799 | T} |
| 1800 | user2 u2 u2 T{ |
| 1801 | .ad l |
| 1802 | User string #2 |
| 1803 | T} |
| 1804 | user3 u3 u3 T{ |
| 1805 | .ad l |
| 1806 | User string #3 |
| 1807 | T} |
| 1808 | user4 u4 u4 T{ |
| 1809 | .ad l |
| 1810 | User string #4 |
| 1811 | T} |
| 1812 | user5 u5 u5 T{ |
| 1813 | .ad l |
| 1814 | User string #5 |
| 1815 | T} |
| 1816 | user6 u6 u6 T{ |
| 1817 | .ad l |
| 1818 | User string #6 |
| 1819 | T} |
| 1820 | user7 u7 u7 T{ |
| 1821 | .ad l |
| 1822 | User string #7 |
| 1823 | T} |
| 1824 | user8 u8 u8 T{ |
| 1825 | .ad l |
| 1826 | User string #8 |
| 1827 | T} |
| 1828 | user9 u9 u9 T{ |
| 1829 | .ad l |
| 1830 | User string #9 |
| 1831 | T} |
| 1832 | orig_pair op op T{ |
| 1833 | .ad l |
| 1834 | Set default pair to its original value |
| 1835 | T} |
| 1836 | orig_colors oc oc T{ |
| 1837 | .ad l |
| 1838 | Set all color pairs to the original ones |
| 1839 | T} |
| 1840 | initialize_color initc Ic T{ |
| 1841 | .ad l |
| 1842 | initialize color #1 to (#2,#3,#4) |
| 1843 | T} |
| 1844 | initialize_pair initp Ip T{ |
| 1845 | .ad l |
| 1846 | Initialize color pair #1 to fg=(#2,#3,#4), bg=(#5,#6,#7) |
| 1847 | T} |
| 1848 | set_color_pair scp sp T{ |
| 1849 | .ad l |
| 1850 | Set current color pair to #1 |
| 1851 | T} |
| 1852 | set_foreground setf Sf T{ |
| 1853 | .ad l |
| 1854 | Set foreground color #1 |
| 1855 | T} |
| 1856 | set_background setb Sb T{ |
| 1857 | .ad l |
| 1858 | Set background color #1 |
| 1859 | T} |
| 1860 | change_char_pitch cpi ZA T{ |
| 1861 | .ad l |
| 1862 | Change number of characters per inch to #1 |
| 1863 | T} |
| 1864 | change_line_pitch lpi ZB T{ |
| 1865 | .ad l |
| 1866 | Change number of lines per inch to #1 |
| 1867 | T} |
| 1868 | change_res_horz chr ZC T{ |
| 1869 | .ad l |
| 1870 | Change horizontal resolution to #1 |
| 1871 | T} |
| 1872 | change_res_vert cvr ZD T{ |
| 1873 | .ad l |
| 1874 | Change vertical resolution to #1 |
| 1875 | T} |
| 1876 | define_char defc ZE T{ |
| 1877 | .ad l |
| 1878 | Define a character #1, #2 dots wide, descender #3 |
| 1879 | T} |
| 1880 | enter_doublewide_mode swidm ZF T{ |
| 1881 | .ad l |
| 1882 | Enter double-wide mode |
| 1883 | T} |
| 1884 | .TE |
| 1885 | .TS |
| 1886 | center; |
| 1887 | Lbw(25n)2 Lbw(8n)2 Lb2 Lx. |
| 1888 | enter_draft_quality sdrfq ZG T{ |
| 1889 | .ad l |
| 1890 | Enter draft-quality mode |
| 1891 | T} |
| 1892 | enter_italics_mode sitm ZH T{ |
| 1893 | .ad l |
| 1894 | Enter italic mode |
| 1895 | T} |
| 1896 | enter_leftward_mode slm ZI T{ |
| 1897 | .ad l |
| 1898 | Start leftward carriage motion |
| 1899 | T} |
| 1900 | enter_micro_mode smicm ZJ T{ |
| 1901 | .ad l |
| 1902 | Start micro-motion mode |
| 1903 | T} |
| 1904 | enter_near_letter_quality snlq ZK T{ |
| 1905 | .ad l |
| 1906 | Enter NLQ mode |
| 1907 | T} |
| 1908 | enter_normal_quality snrmq ZL T{ |
| 1909 | .ad l |
| 1910 | Enter normal-quality mode |
| 1911 | T} |
| 1912 | enter_shadow_mode sshm ZM T{ |
| 1913 | .ad l |
| 1914 | Enter shadow-print mode |
| 1915 | T} |
| 1916 | enter_subscript_mode ssubm ZN T{ |
| 1917 | .ad l |
| 1918 | Enter subscript mode |
| 1919 | T} |
| 1920 | enter_superscript_mode ssupm ZO T{ |
| 1921 | .ad l |
| 1922 | Enter superscript mode |
| 1923 | T} |
| 1924 | enter_upward_mode sum ZP T{ |
| 1925 | .ad l |
| 1926 | Start upward carriage motion |
| 1927 | T} |
| 1928 | exit_doublewide_mode rwidm ZQ T{ |
| 1929 | .ad l |
| 1930 | End double-wide mode |
| 1931 | T} |
| 1932 | exit_italics_mode ritm ZR T{ |
| 1933 | .ad l |
| 1934 | End italic mode |
| 1935 | T} |
| 1936 | exit_leftward_mode rlm ZS T{ |
| 1937 | .ad l |
| 1938 | End left-motion mode |
| 1939 | T} |
| 1940 | exit_micro_mode rmicm ZT T{ |
| 1941 | .ad l |
| 1942 | End micro-motion mode |
| 1943 | T} |
| 1944 | exit_shadow_mode rshm ZU T{ |
| 1945 | .ad l |
| 1946 | End shadow-print mode |
| 1947 | T} |
| 1948 | exit_subscript_mode rsubm ZV T{ |
| 1949 | .ad l |
| 1950 | End subscript mode |
| 1951 | T} |
| 1952 | exit_superscript_mode rsupm ZW T{ |
| 1953 | .ad l |
| 1954 | End superscript mode |
| 1955 | T} |
| 1956 | exit_upward_mode rum ZX T{ |
| 1957 | .ad l |
| 1958 | End reverse character motion |
| 1959 | T} |
| 1960 | micro_column_address mhpa ZY T{ |
| 1961 | .ad l |
| 1962 | Like column_address in micro mode |
| 1963 | T} |
| 1964 | micro_down mcud1 ZZ T{ |
| 1965 | .ad l |
| 1966 | Like cursor_down in micro mode |
| 1967 | T} |
| 1968 | micro_left mcub1 Za T{ |
| 1969 | .ad l |
| 1970 | Like cursor_left in micro mode |
| 1971 | T} |
| 1972 | micro_right mcuf1 Zb T{ |
| 1973 | .ad l |
| 1974 | Like cursor_right in micro mode |
| 1975 | T} |
| 1976 | micro_row_address mvpa Zc T{ |
| 1977 | .ad l |
| 1978 | Like row_address #1 in micro mode |
| 1979 | T} |
| 1980 | micro_up mcuu1 Zd T{ |
| 1981 | .ad l |
| 1982 | Like cursor_up in micro mode |
| 1983 | T} |
| 1984 | order_of_pins porder Ze T{ |
| 1985 | .ad l |
| 1986 | Match software bits to print-head pins |
| 1987 | T} |
| 1988 | parm_down_micro mcud Zf T{ |
| 1989 | .ad l |
| 1990 | Like parm_down_cursor in micro mode |
| 1991 | T} |
| 1992 | parm_left_micro mcub Zg T{ |
| 1993 | .ad l |
| 1994 | Like parm_left_cursor in micro mode |
| 1995 | T} |
| 1996 | parm_right_micro mcuf Zh T{ |
| 1997 | .ad l |
| 1998 | Like parm_right_cursor in micro mode |
| 1999 | T} |
| 2000 | parm_up_micro mcuu Zi T{ |
| 2001 | .ad l |
| 2002 | Like parm_up_cursor in micro mode |
| 2003 | T} |
| 2004 | select_char_set scs Zj T{ |
| 2005 | .ad l |
| 2006 | Select character set, #1 |
| 2007 | T} |
| 2008 | set_bottom_margin smgb Zk T{ |
| 2009 | .ad l |
| 2010 | Set bottom margin at current line |
| 2011 | T} |
| 2012 | set_bottom_margin_parm smgbp Zl T{ |
| 2013 | .ad l |
| 2014 | Set bottom margin at line #1 or (if smgtp is not given) #2 lines from bottom |
| 2015 | T} |
| 2016 | set_left_margin_parm smglp Zm T{ |
| 2017 | .ad l |
| 2018 | Set left (right) margin at column #1 |
| 2019 | T} |
| 2020 | set_right_margin_parm smgrp Zn T{ |
| 2021 | .ad l |
| 2022 | Set right margin at column #1 |
| 2023 | T} |
| 2024 | set_top_margin smgt Zo T{ |
| 2025 | .ad l |
| 2026 | Set top margin at current line |
| 2027 | T} |
| 2028 | set_top_margin_parm smgtp Zp T{ |
| 2029 | .ad l |
| 2030 | Set top (bottom) margin at row #1 |
| 2031 | T} |
| 2032 | start_bit_image sbim Zq T{ |
| 2033 | .ad l |
| 2034 | Start printing bit image graphics |
| 2035 | T} |
| 2036 | start_char_set_def scsd Zr T{ |
| 2037 | .ad l |
| 2038 | Start character set definition #1, with #2 characters in the set |
| 2039 | T} |
| 2040 | stop_bit_image rbim Zs T{ |
| 2041 | .ad l |
| 2042 | Stop printing bit image graphics |
| 2043 | T} |
| 2044 | stop_char_set_def rcsd Zt T{ |
| 2045 | .ad l |
| 2046 | End definition of character set #1 |
| 2047 | T} |
| 2048 | subscript_characters subcs Zu T{ |
| 2049 | .ad l |
| 2050 | List of subscriptable characters |
| 2051 | T} |
| 2052 | superscript_characters supcs Zv T{ |
| 2053 | .ad l |
| 2054 | List of superscriptable characters |
| 2055 | T} |
| 2056 | these_cause_cr docr Zw T{ |
| 2057 | .ad l |
| 2058 | Printing any of these characters causes CR |
| 2059 | T} |
| 2060 | zero_motion zerom Zx T{ |
| 2061 | .ad l |
| 2062 | No motion for subsequent character |
| 2063 | T} |
| 2064 | .TE |
| 2065 | .PP |
| 2066 | . |
| 2067 | The following string capabilities are present in the SVr4.0 term structure, |
| 2068 | but were originally not documented in the man page. |
| 2069 | . |
| 2070 | .PP |
| 2071 | .TS |
| 2072 | center; |
| 2073 | Lb Cb S Lb |
| 2074 | Lb Lb Lb Lb |
| 2075 | Lbw(25n)2 Lbw(8n)2 Lb2 Lx. |
| 2076 | \& Code \& |
| 2077 | String Capability Name TI TC Description |
| 2078 | _ |
| 2079 | char_set_names csnm Zy T{ |
| 2080 | .ad l |
| 2081 | Produce #1'th item from list of character set names |
| 2082 | T} |
| 2083 | key_mouse kmous Km T{ |
| 2084 | .ad l |
| 2085 | Mouse event has occurred |
| 2086 | T} |
| 2087 | mouse_info minfo Mi T{ |
| 2088 | .ad l |
| 2089 | Mouse status information |
| 2090 | T} |
| 2091 | req_mouse_pos reqmp RQ T{ |
| 2092 | .ad l |
| 2093 | Request mouse position |
| 2094 | T} |
| 2095 | get_mouse getm Gm T{ |
| 2096 | .ad l |
| 2097 | Curses should get button events, parameter #1 not documented. |
| 2098 | T} |
| 2099 | set_a_foreground setaf AF T{ |
| 2100 | .ad l |
| 2101 | Set foreground color to #1, using ANSI escape |
| 2102 | T} |
| 2103 | set_a_background setab AB T{ |
| 2104 | .ad l |
| 2105 | Set background color to #1, using ANSI escape |
| 2106 | T} |
| 2107 | pkey_plab pfxl xl T{ |
| 2108 | .ad l |
| 2109 | Program function key #1 to type string #2 and show string #3 |
| 2110 | T} |
| 2111 | device_type devt dv T{ |
| 2112 | .ad l |
| 2113 | Indicate language, codeset support |
| 2114 | T} |
| 2115 | code_set_init csin ci T{ |
| 2116 | .ad l |
| 2117 | Init sequence for multiple codesets |
| 2118 | T} |
| 2119 | set0_des_seq s0ds s0 T{ |
| 2120 | .ad l |
| 2121 | Shift to codeset 0 (EUC set 0, ASCII) |
| 2122 | T} |
| 2123 | set1_des_seq s1ds s1 T{ |
| 2124 | .ad l |
| 2125 | Shift to codeset 1 |
| 2126 | T} |
| 2127 | set2_des_seq s2ds s2 T{ |
| 2128 | .ad l |
| 2129 | Shift to codeset 2 |
| 2130 | T} |
| 2131 | set3_des_seq s3ds s3 T{ |
| 2132 | .ad l |
| 2133 | Shift to codeset 3 |
| 2134 | T} |
| 2135 | set_lr_margin smglr ML T{ |
| 2136 | .ad l |
| 2137 | Set both left and right margins to #1, #2. (ML is not in BSD termcap). |
| 2138 | T} |
| 2139 | set_tb_margin smgtb MT T{ |
| 2140 | .ad l |
| 2141 | Sets both top and bottom margins to #1, #2 |
| 2142 | T} |
| 2143 | bit_image_repeat birep Xy T{ |
| 2144 | .ad l |
| 2145 | Repeat bit image cell #1 #2 times |
| 2146 | T} |
| 2147 | bit_image_newline binel Zz T{ |
| 2148 | .ad l |
| 2149 | Move to next row of the bit image |
| 2150 | T} |
| 2151 | bit_image_carriage_return bicr Yv T{ |
| 2152 | .ad l |
| 2153 | Move to beginning of same row |
| 2154 | T} |
| 2155 | color_names colornm Yw T{ |
| 2156 | .ad l |
| 2157 | Give name for color #1 |
| 2158 | T} |
| 2159 | define_bit_image_region defbi Yx T{ |
| 2160 | .ad l |
| 2161 | Define rectangular bit image region |
| 2162 | T} |
| 2163 | end_bit_image_region endbi Yy T{ |
| 2164 | .ad l |
| 2165 | End a bit-image region |
| 2166 | T} |
| 2167 | set_color_band setcolor Yz T{ |
| 2168 | .ad l |
| 2169 | Change to ribbon color #1 |
| 2170 | T} |
| 2171 | set_page_length slines YZ T{ |
| 2172 | .ad l |
| 2173 | Set page length to #1 lines |
| 2174 | T} |
| 2175 | display_pc_char dispc S1 T{ |
| 2176 | .ad l |
| 2177 | Display PC character #1 |
| 2178 | T} |
| 2179 | enter_pc_charset_mode smpch S2 T{ |
| 2180 | .ad l |
| 2181 | Enter PC character display mode |
| 2182 | T} |
| 2183 | exit_pc_charset_mode rmpch S3 T{ |
| 2184 | .ad l |
| 2185 | Exit PC character display mode |
| 2186 | T} |
| 2187 | enter_scancode_mode smsc S4 T{ |
| 2188 | .ad l |
| 2189 | Enter PC scancode mode |
| 2190 | T} |
| 2191 | exit_scancode_mode rmsc S5 T{ |
| 2192 | .ad l |
| 2193 | Exit PC scancode mode |
| 2194 | T} |
| 2195 | pc_term_options pctrm S6 T{ |
| 2196 | .ad l |
| 2197 | PC terminal options |
| 2198 | T} |
| 2199 | scancode_escape scesc S7 T{ |
| 2200 | .ad l |
| 2201 | Escape for scancode emulation |
| 2202 | T} |
| 2203 | alt_scancode_esc scesa S8 T{ |
| 2204 | .ad l |
| 2205 | Alternate escape for scancode emulation |
| 2206 | T} |
| 2207 | .TE |
| 2208 | .PP |
| 2209 | . |
| 2210 | The XSI Curses standard added these hardcopy capabilities. |
| 2211 | They were used in some post-4.1 versions of System V curses, |
| 2212 | e.g., Solaris 2.5 and IRIX 6.x. |
| 2213 | Except for \fBYI\fP, the \fBncurses\fR termcap names for them are invented. |
| 2214 | According to the XSI Curses standard, they have no termcap names. |
| 2215 | If your compiled terminfo entries use these, |
| 2216 | they may not be binary-compatible with System V terminfo |
| 2217 | entries after SVr4.1; beware! |
| 2218 | . |
| 2219 | .PP |
| 2220 | .TS |
| 2221 | center; |
| 2222 | Lb Cb S Lb |
| 2223 | Lb Lb Lb Lb |
| 2224 | Lbw(25n)2 Lbw(8n)2 Lb2 Lx. |
| 2225 | \& Code \& |
| 2226 | String Capability Name TI TC Description |
| 2227 | _ |
| 2228 | enter_horizontal_hl_mode ehhlm Xh T{ |
| 2229 | .ad l |
| 2230 | Enter horizontal highlight mode |
| 2231 | T} |
| 2232 | enter_left_hl_mode elhlm Xl T{ |
| 2233 | .ad l |
| 2234 | Enter left highlight mode |
| 2235 | T} |
| 2236 | enter_low_hl_mode elohlm Xo T{ |
| 2237 | .ad l |
| 2238 | Enter low highlight mode |
| 2239 | T} |
| 2240 | enter_right_hl_mode erhlm Xr T{ |
| 2241 | .ad l |
| 2242 | Enter right highlight mode |
| 2243 | T} |
| 2244 | enter_top_hl_mode ethlm Xt T{ |
| 2245 | .ad l |
| 2246 | Enter top highlight mode |
| 2247 | T} |
| 2248 | enter_vertical_hl_mode evhlm Xv T{ |
| 2249 | .ad l |
| 2250 | Enter vertical highlight mode |
| 2251 | T} |
| 2252 | set_a_attributes sgr1 sA T{ |
| 2253 | .ad l |
| 2254 | Define second set of video attributes #1-#6 |
| 2255 | T} |
| 2256 | set_pglen_inch slength YI T{ |
| 2257 | .ad l |
| 2258 | Set page length to #1 hundredth of an inch (some implementations use sL for termcap). |
| 2259 | T} |
| 2260 | .TE |
| 2261 | .\"*************************************************************************** |
| 2262 | .\" Copyright 2018-2023,2024 Thomas E. Dickey * |
| 2263 | .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * |
| 2264 | .\" * |
| 2265 | .\" Permission is hereby granted, free of charge, to any person obtaining a * |
| 2266 | .\" copy of this software and associated documentation files (the * |
| 2267 | .\" "Software"), to deal in the Software without restriction, including * |
| 2268 | .\" without limitation the rights to use, copy, modify, merge, publish, * |
| 2269 | .\" distribute, distribute with modifications, sublicense, and/or sell * |
| 2270 | .\" copies of the Software, and to permit persons to whom the Software is * |
| 2271 | .\" furnished to do so, subject to the following conditions: * |
| 2272 | .\" * |
| 2273 | .\" The above copyright notice and this permission notice shall be included * |
| 2274 | .\" in all copies or substantial portions of the Software. * |
| 2275 | .\" * |
| 2276 | .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * |
| 2277 | .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * |
| 2278 | .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * |
| 2279 | .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * |
| 2280 | .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * |
| 2281 | .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * |
| 2282 | .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * |
| 2283 | .\" * |
| 2284 | .\" Except as contained in this notice, the name(s) of the above copyright * |
| 2285 | .\" holders shall not be used in advertising or otherwise to promote the * |
| 2286 | .\" sale, use or other dealings in this Software without prior written * |
| 2287 | .\" authorization. * |
| 2288 | .\"*************************************************************************** |
| 2289 | .\" |
| 2290 | .\" $Id: terminfo.tail,v 1.148 2024/04/20 21:24:19 tom Exp $ |
| 2291 | .ps +1 |
| 2292 | .SS "User-Defined Capabilities" |
| 2293 | . |
| 2294 | The preceding section listed the \fIpredefined\fP capabilities. |
| 2295 | They deal with some special features for terminals no longer |
| 2296 | (or possibly never) produced. |
| 2297 | Occasionally there are special features of newer terminals which |
| 2298 | are awkward or impossible to represent by reusing the predefined |
| 2299 | capabilities. |
| 2300 | .PP |
| 2301 | \fI\%ncurses\fP addresses this limitation by allowing user-defined |
| 2302 | capabilities. |
| 2303 | The \fB@TIC@\fP and \fB@INFOCMP@\fP programs provide |
| 2304 | the \fB\-x\fP option for this purpose. |
| 2305 | When \fB\-x\fP is set, |
| 2306 | \fB@TIC@\fP treats unknown capabilities as user-defined. |
| 2307 | That is, if \fB@TIC@\fP encounters a capability name |
| 2308 | which it does not recognize, |
| 2309 | it infers its type (Boolean, number or string) from the syntax |
| 2310 | and makes an extended table entry for that capability. |
| 2311 | The \fBuse_extended_names\fP(3X) function makes this information |
| 2312 | conditionally available to applications. |
| 2313 | The \fI\%ncurses\fP library provides the data leaving most of the |
| 2314 | behavior to applications: |
| 2315 | .bP |
| 2316 | User-defined capability strings whose name begins |
| 2317 | with \*(``k\*('' are treated as function keys. |
| 2318 | .bP |
| 2319 | The types (Boolean, number, string) determined by \fB@TIC@\fP |
| 2320 | can be inferred by successful calls on \fBtigetflag\fP, etc. |
| 2321 | .bP |
| 2322 | If the capability name happens to be two characters, |
| 2323 | the capability is also available through the termcap interface. |
| 2324 | .PP |
| 2325 | While termcap is said to be extensible because it does not use a predefined set |
| 2326 | of capabilities, |
| 2327 | in practice it has been limited to the capabilities defined by |
| 2328 | terminfo implementations. |
| 2329 | As a rule, |
| 2330 | user-defined capabilities intended for use by termcap applications should |
| 2331 | be limited to Booleans and numbers to avoid running past the 1023 byte |
| 2332 | limit assumed by termcap implementations and their applications. |
| 2333 | In particular, providing extended sets of function keys (past the 60 |
| 2334 | numbered keys and the handful of special named keys) is best done using |
| 2335 | the longer names available using terminfo. |
| 2336 | .PP |
| 2337 | The \fI\%ncurses\fP library uses a few of these user-defined |
| 2338 | capabilities, |
| 2339 | as described in \fBuser_caps\fR(5). |
| 2340 | Other user-defined capabilities (including function keys) are |
| 2341 | described in the terminal database, in the section on |
| 2342 | .I "NCURSES USER-DEFINABLE CAPABILITIES" |
| 2343 | . |
| 2344 | .SS "A Sample Entry" |
| 2345 | . |
| 2346 | The following entry, describing an ANSI-standard terminal, is representative |
| 2347 | of what a \fBterminfo\fP entry for a modern terminal typically looks like. |
| 2348 | .PP |
| 2349 | .EX |
| 2350 | \s-2ansi|ansi/pc\-term compatible with color, |
| 2351 | am, mc5i, mir, msgr, |
| 2352 | colors#8, cols#80, it#8, lines#24, ncv#3, pairs#64, |
| 2353 | acsc=+\e020\e,\e021\-\e030.\*^Y0\e333\(ga\e004a\e261f\e370g\e361h\e260 |
| 2354 | j\e331k\e277l\e332m\e300n\e305o\*~p\e304q\e304r\e304s_t\e303 |
| 2355 | u\e264v\e301w\e302x\e263y\e363z\e362{\e343|\e330}\e234\*~\e376, |
| 2356 | bel=\*^G, blink=\eE[5m, bold=\eE[1m, cbt=\eE[Z, clear=\eE[H\eE[J, |
| 2357 | cr=\*^M, cub=\eE[%p1%dD, cub1=\eE[D, cud=\eE[%p1%dB, cud1=\eE[B, |
| 2358 | cuf=\eE[%p1%dC, cuf1=\eE[C, cup=\eE[%i%p1%d;%p2%dH, |
| 2359 | cuu=\eE[%p1%dA, cuu1=\eE[A, dch=\eE[%p1%dP, dch1=\eE[P, |
| 2360 | dl=\eE[%p1%dM, dl1=\eE[M, ech=\eE[%p1%dX, ed=\eE[J, el=\eE[K, |
| 2361 | el1=\eE[1K, home=\eE[H, hpa=\eE[%i%p1%dG, ht=\eE[I, hts=\eEH, |
| 2362 | ich=\eE[%p1%d@, il=\eE[%p1%dL, il1=\eE[L, ind=\*^J, |
| 2363 | indn=\eE[%p1%dS, invis=\eE[8m, kbs=\*^H, kcbt=\eE[Z, kcub1=\eE[D, |
| 2364 | kcud1=\eE[B, kcuf1=\eE[C, kcuu1=\eE[A, khome=\eE[H, kich1=\eE[L, |
| 2365 | mc4=\eE[4i, mc5=\eE[5i, nel=\er\eE[S, op=\eE[39;49m, |
| 2366 | rep=%p1%c\eE[%p2%{1}%\-%db, rev=\eE[7m, rin=\eE[%p1%dT, |
| 2367 | rmacs=\eE[10m, rmpch=\eE[10m, rmso=\eE[m, rmul=\eE[m, |
| 2368 | s0ds=\eE(B, s1ds=\eE)B, s2ds=\eE*B, s3ds=\eE+B, |
| 2369 | setab=\eE[4%p1%dm, setaf=\eE[3%p1%dm, |
| 2370 | sgr=\eE[0;10%?%p1%t;7%; |
| 2371 | %?%p2%t;4%; |
| 2372 | %?%p3%t;7%; |
| 2373 | %?%p4%t;5%; |
| 2374 | %?%p6%t;1%; |
| 2375 | %?%p7%t;8%; |
| 2376 | %?%p9%t;11%;m, |
| 2377 | sgr0=\eE[0;10m, smacs=\eE[11m, smpch=\eE[11m, smso=\eE[7m, |
| 2378 | smul=\eE[4m, tbc=\eE[3g, u6=\eE[%i%d;%dR, u7=\eE[6n, |
| 2379 | u8=\eE[?%[;0123456789]c, u9=\eE[c, vpa=\eE[%i%p1%dd, |
| 2380 | .EE |
| 2381 | .PP |
| 2382 | Entries may continue onto multiple lines by placing white space at |
| 2383 | the beginning of each line except the first. |
| 2384 | Comments may be included on lines beginning with \*(``#\*(''. |
| 2385 | Capabilities in |
| 2386 | .I terminfo |
| 2387 | are of three types: |
| 2388 | .bP |
| 2389 | Boolean capabilities which indicate that the terminal has |
| 2390 | some particular feature, |
| 2391 | .bP |
| 2392 | numeric capabilities giving the size of the terminal |
| 2393 | or the size of particular delays, and |
| 2394 | .bP |
| 2395 | string |
| 2396 | capabilities, which give a sequence which can be used to perform particular |
| 2397 | terminal operations. |
| 2398 | .SS "Types of Capabilities" |
| 2399 | All capabilities have names. |
| 2400 | For instance, the fact that |
| 2401 | ANSI-standard terminals have |
| 2402 | .I "automatic margins" |
| 2403 | (i.e., an automatic return and line-feed |
| 2404 | when the end of a line is reached) is indicated by the capability \fBam\fP. |
| 2405 | Hence the description of ansi includes \fBam\fP. |
| 2406 | Numeric capabilities are followed by the character \*(``#\*('' |
| 2407 | and then a positive value. |
| 2408 | Thus \fBcols\fP, which indicates the number of columns the terminal has, |
| 2409 | gives the value \*(``80\*('' for ansi. |
| 2410 | Values for numeric capabilities may be specified in |
| 2411 | decimal, |
| 2412 | octal, or |
| 2413 | hexadecimal, |
| 2414 | using the C programming language conventions |
| 2415 | (e.g., 255, 0377 and 0xff or 0xFF). |
| 2416 | .PP |
| 2417 | Finally, string valued capabilities, |
| 2418 | such as \fBel\fP (clear to end of line sequence) |
| 2419 | are given by the two-character code, |
| 2420 | an \*(``=\*('', and then |
| 2421 | a string ending at the next following \*(``,\*(''. |
| 2422 | .PP |
| 2423 | A number of escape sequences are provided in the string valued capabilities |
| 2424 | for easy encoding of characters there: |
| 2425 | .bP |
| 2426 | Both \fB\eE\fP and \fB\ee\fP |
| 2427 | map to an \s-1ESCAPE\s0 character, |
| 2428 | .bP |
| 2429 | \fB\*^\f(BIx\fR maps to a control-\fIx\fP for any appropriate \fIx\fP, |
| 2430 | and |
| 2431 | .bP |
| 2432 | the sequences |
| 2433 | .RS 6 |
| 2434 | .PP |
| 2435 | \fB\en\fP, \fB\el\fP, \fB\er\fP, \fB\et\fP, \fB\eb\fP, \fB\ef\fP, and \fB\es\fP |
| 2436 | .RE |
| 2437 | .IP |
| 2438 | produce |
| 2439 | .RS 6 |
| 2440 | .PP |
| 2441 | \fInewline\fP, \fIline-feed\fP, \fIreturn\fP, \fItab\fP, \fIbackspace\fP, \fIform-feed\fP, and \fIspace\fP, |
| 2442 | .RE |
| 2443 | .IP |
| 2444 | respectively. |
| 2445 | .PP |
| 2446 | X/Open Curses does not say what \*(``appropriate \fIx\fP\*('' might be. |
| 2447 | In practice, that is a printable ASCII graphic character. |
| 2448 | The special case \*(``\*^?\*('' is interpreted as DEL (127). |
| 2449 | In all other cases, the character value is AND'd with 0x1f, |
| 2450 | mapping to ASCII control codes in the range 0 through 31. |
| 2451 | .PP |
| 2452 | Other escapes include |
| 2453 | .bP |
| 2454 | \fB\e\*^\fP for \fB\*^\fP, |
| 2455 | .bP |
| 2456 | \fB\e\e\fP for \fB\e\fP, |
| 2457 | .bP |
| 2458 | \fB\e\fP, for comma, |
| 2459 | .bP |
| 2460 | \fB\e:\fP for \fB:\fP, |
| 2461 | .bP |
| 2462 | and \fB\e0\fP for null. |
| 2463 | .IP |
| 2464 | \fB\e0\fP will produce \e200, which does not terminate a string but behaves |
| 2465 | as a null character on most terminals, providing CS7 is specified. |
| 2466 | See \fBstty\fP(1). |
| 2467 | .IP |
| 2468 | The reason for this quirk is to maintain binary compatibility of the |
| 2469 | compiled terminfo files with other implementations, |
| 2470 | e.g., the SVr4 systems, which document this. |
| 2471 | Compiled terminfo files use null-terminated strings, with no lengths. |
| 2472 | Modifying this would require a new binary format, |
| 2473 | which would not work with other implementations. |
| 2474 | .PP |
| 2475 | Finally, characters may be given as three octal digits after a \fB\e\fP. |
| 2476 | .PP |
| 2477 | A delay in milliseconds may appear anywhere in a string capability, enclosed in |
| 2478 | $<..> brackets, as in \fBel\fP=\eEK$<5>, |
| 2479 | and padding characters are supplied by \fBtputs\fP(3X) |
| 2480 | to provide this delay. |
| 2481 | .bP |
| 2482 | The delay must be a number with at most one decimal |
| 2483 | place of precision; |
| 2484 | it may be followed by suffixes \*(``*\*('' or \*(``/\*('' or both. |
| 2485 | .bP |
| 2486 | A \*(``*\*('' |
| 2487 | indicates that the padding required is proportional to the number of lines |
| 2488 | affected by the operation, and the amount given is the per-affected-unit |
| 2489 | padding required. |
| 2490 | (In the case of insert character, the factor is still the |
| 2491 | number of \fIlines\fP affected.) |
| 2492 | .IP |
| 2493 | Normally, padding is advisory if the device has the \fBxon\fP |
| 2494 | capability; it is used for cost computation but does not trigger delays. |
| 2495 | .bP |
| 2496 | A \*(``/\*('' |
| 2497 | suffix indicates that the padding is mandatory and forces a delay of the given |
| 2498 | number of milliseconds even on devices for which \fBxon\fP is present to |
| 2499 | indicate flow control. |
| 2500 | .PP |
| 2501 | Sometimes individual capabilities must be commented out. |
| 2502 | To do this, put a period before the capability name. |
| 2503 | For example, see the second |
| 2504 | .B ind |
| 2505 | in the example above. |
| 2506 | .br |
| 2507 | .ne 5 |
| 2508 | .SS "Fetching Compiled Descriptions" |
| 2509 | Terminal descriptions in \fI\%ncurses\fP are stored in terminal |
| 2510 | databases. |
| 2511 | These databases, which are found by their pathname, |
| 2512 | may be configured either as directory trees or hashed databases |
| 2513 | (see \fBterm\fR(5)), |
| 2514 | .PP |
| 2515 | The library uses a compiled-in list of pathnames, |
| 2516 | which can be overridden by environment variables. |
| 2517 | Before starting to search, |
| 2518 | \fI\%ncurses\fP checks the search list, |
| 2519 | eliminating duplicates and pathnames where no terminal database is found. |
| 2520 | The \fI\%ncurses\fP library reads the first description |
| 2521 | which passes its consistency checks. |
| 2522 | .bP |
| 2523 | The environment variable \fBTERMINFO\fR is checked first, for |
| 2524 | a terminal database containing the terminal description. |
| 2525 | .bP |
| 2526 | Next, |
| 2527 | \fI\%ncurses\fP looks in \fI$HOME/.terminfo\fP |
| 2528 | for a compiled description. |
| 2529 | .IP |
| 2530 | This is an optional feature which may be omitted entirely from |
| 2531 | the library, or limited to prevent accidental use by privileged applications. |
| 2532 | .bP |
| 2533 | Next, |
| 2534 | if the environment variable \fI\%TERMINFO_DIRS\fP is set, |
| 2535 | \fI\%ncurses\fP interprets the contents of that variable |
| 2536 | as a list of colon-separated pathnames of terminal databases to be searched. |
| 2537 | .IP |
| 2538 | An empty pathname (i.e., if the variable begins or ends |
| 2539 | with a colon, or contains adjacent colons) |
| 2540 | is interpreted as the system location \fI\*d\fP. |
| 2541 | .bP |
| 2542 | Finally, \fI\%ncurses\fP searches these compiled-in locations: |
| 2543 | .RS |
| 2544 | .bP |
| 2545 | a list of directories (@TERMINFO_DIRS@), and |
| 2546 | .bP |
| 2547 | the system terminfo directory, \fI\*d\fP |
| 2548 | .RE |
| 2549 | .PP |
| 2550 | The \fBTERMINFO\fP variable can contain a terminal description instead |
| 2551 | of the pathname of a terminal database. |
| 2552 | If this variable begins with \*(``hex:\*('' or \*(``b64:\*('' |
| 2553 | then \fI\%ncurses\fP reads a terminal description from |
| 2554 | hexadecimal- or base64-encoded data, |
| 2555 | and if that description matches the name sought, will use that. |
| 2556 | This encoded data can be set using the \*(``\-Q\*('' option of |
| 2557 | \fB@TIC@\fR or \fB@INFOCMP@\fR. |
| 2558 | .PP |
| 2559 | The preceding addresses the usual configuration of \fI\%ncurses\fP, |
| 2560 | which uses terminal descriptions prepared in \fIterminfo\fP format. |
| 2561 | While \fItermcap\fP is less expressive, |
| 2562 | \fI\%ncurses\fP can also be configured to read \fItermcap\fP |
| 2563 | descriptions. |
| 2564 | In that configuration, |
| 2565 | it checks the \fI\%TERMCAP\fP and \fI\%TERMPATH\fP variables |
| 2566 | (for content and search path, |
| 2567 | respectively) |
| 2568 | after the system terminal database. |
| 2569 | .SS "Preparing Descriptions" |
| 2570 | We now outline how to prepare descriptions of terminals. |
| 2571 | The most effective way to prepare a terminal description is by imitating |
| 2572 | the description of a similar terminal in |
| 2573 | .I terminfo |
| 2574 | and to build up a description gradually, using partial descriptions |
| 2575 | with |
| 2576 | .I vi |
| 2577 | or some other screen-oriented program to check that they are correct. |
| 2578 | Be aware that a very unusual terminal may expose deficiencies in |
| 2579 | the ability of the |
| 2580 | .I terminfo |
| 2581 | file to describe it |
| 2582 | or bugs in the screen-handling code of the test program. |
| 2583 | .PP |
| 2584 | To get the padding for insert line right (if the terminal manufacturer |
| 2585 | did not document it) a severe test is to edit a large file at 9600 baud, |
| 2586 | delete 16 or so lines from the middle of the screen, then hit the \*(``u\*('' |
| 2587 | key several times quickly. |
| 2588 | If the terminal messes up, more padding is usually needed. |
| 2589 | A similar test can be used for insert character. |
| 2590 | .SS "Basic Capabilities" |
| 2591 | The number of columns on each line for the terminal is given by the |
| 2592 | \fBcols\fP numeric capability. |
| 2593 | If the terminal is a \s-1CRT\s0, then the |
| 2594 | number of lines on the screen is given by the \fBlines\fP capability. |
| 2595 | If the terminal wraps around to the beginning of the next line when |
| 2596 | it reaches the right margin, then it should have the \fBam\fP capability. |
| 2597 | If the terminal can clear its screen, leaving the cursor in the home |
| 2598 | position, then this is given by the \fBclear\fP string capability. |
| 2599 | If the terminal overstrikes |
| 2600 | (rather than clearing a position when a character is struck over) |
| 2601 | then it should have the \fBos\fP capability. |
| 2602 | If the terminal is a printing terminal, with no soft copy unit, |
| 2603 | give it both |
| 2604 | .B hc |
| 2605 | and |
| 2606 | .BR os . |
| 2607 | .RB ( os |
| 2608 | applies to storage scope terminals, such as \s-1TEKTRONIX\s+1 4010 |
| 2609 | series, as well as hard copy and APL terminals.) |
| 2610 | If there is a code to move the cursor to the left edge of the current |
| 2611 | row, give this as |
| 2612 | .BR cr . |
| 2613 | (Normally this will be carriage return, control/M.) |
| 2614 | If there is a code to produce an audible signal (bell, beep, etc) |
| 2615 | give this as |
| 2616 | .BR bel . |
| 2617 | .PP |
| 2618 | If there is a code to move the cursor one position to the left |
| 2619 | (such as backspace) that capability should be given as |
| 2620 | .BR cub1 . |
| 2621 | Similarly, codes to move to the right, up, and down should be |
| 2622 | given as |
| 2623 | .BR cuf1 , |
| 2624 | .BR cuu1 , |
| 2625 | and |
| 2626 | .BR cud1 . |
| 2627 | These local cursor motions should not alter the text they pass over, |
| 2628 | for example, you would not normally use \*(``\fBcuf1\fP=\ \*('' because the |
| 2629 | space would erase the character moved over. |
| 2630 | .PP |
| 2631 | A very important point here is that the local cursor motions encoded |
| 2632 | in |
| 2633 | .I terminfo |
| 2634 | are undefined at the left and top edges of a \s-1CRT\s0 terminal. |
| 2635 | Programs should never attempt to backspace around the left edge, |
| 2636 | unless |
| 2637 | .B bw |
| 2638 | is given, |
| 2639 | and never attempt to go up locally off the top. |
| 2640 | In order to scroll text up, a program will go to the bottom left corner |
| 2641 | of the screen and send the |
| 2642 | .B ind |
| 2643 | (index) string. |
| 2644 | .PP |
| 2645 | To scroll text down, a program goes to the top left corner |
| 2646 | of the screen and sends the |
| 2647 | .B ri |
| 2648 | (reverse index) string. |
| 2649 | The strings |
| 2650 | .B ind |
| 2651 | and |
| 2652 | .B ri |
| 2653 | are undefined when not on their respective corners of the screen. |
| 2654 | .PP |
| 2655 | Parameterized versions of the scrolling sequences are |
| 2656 | .B indn |
| 2657 | and |
| 2658 | .B rin |
| 2659 | which have the same semantics as |
| 2660 | .B ind |
| 2661 | and |
| 2662 | .B ri |
| 2663 | except that they take one parameter, and scroll that many lines. |
| 2664 | They are also undefined except at the appropriate edge of the screen. |
| 2665 | .PP |
| 2666 | The \fBam\fP capability tells whether the cursor sticks at the right |
| 2667 | edge of the screen when text is output, but this does not necessarily |
| 2668 | apply to a |
| 2669 | .B cuf1 |
| 2670 | from the last column. |
| 2671 | The only local motion which is defined from the left edge is if |
| 2672 | .B bw |
| 2673 | is given, then a |
| 2674 | .B cub1 |
| 2675 | from the left edge will move to the right edge of the previous row. |
| 2676 | If |
| 2677 | .B bw |
| 2678 | is not given, the effect is undefined. |
| 2679 | This is useful for drawing a box around the edge of the screen, for example. |
| 2680 | If the terminal has switch selectable automatic margins, |
| 2681 | the |
| 2682 | .I terminfo |
| 2683 | file usually assumes that this is on; i.e., \fBam\fP. |
| 2684 | If the terminal has a command which moves to the first column of the next |
| 2685 | line, that command can be given as |
| 2686 | .B nel |
| 2687 | (newline). |
| 2688 | It does not matter if the command clears the remainder of the current line, |
| 2689 | so if the terminal has no |
| 2690 | .B cr |
| 2691 | and |
| 2692 | .B lf |
| 2693 | it may still be possible to craft a working |
| 2694 | .B nel |
| 2695 | out of one or both of them. |
| 2696 | .PP |
| 2697 | These capabilities suffice to describe |
| 2698 | hard-copy and \*(``glass-tty\*('' terminals. |
| 2699 | Thus the model 33 teletype is described as |
| 2700 | .PP |
| 2701 | .EX |
| 2702 | .\".in -2 |
| 2703 | \s-133\||\|tty33\||\|tty\||\|model 33 teletype, |
| 2704 | bel=\*^G, cols#72, cr=\*^M, cud1=\*^J, hc, ind=\*^J, os,\s+1 |
| 2705 | .\".in +2 |
| 2706 | .EE |
| 2707 | .PP |
| 2708 | while the Lear Siegler \s-1ADM-3\s0 is described as |
| 2709 | .PP |
| 2710 | .EX |
| 2711 | .\".in -2 |
| 2712 | \s-1adm3\||\|3\||\|lsi adm3, |
| 2713 | am, bel=\*^G, clear=\*^Z, cols#80, cr=\*^M, cub1=\*^H, cud1=\*^J, |
| 2714 | ind=\*^J, lines#24,\s+1 |
| 2715 | .\".in +2 |
| 2716 | .EE |
| 2717 | .SS "Parameterized Strings" |
| 2718 | Cursor addressing and other strings requiring parameters |
| 2719 | in the terminal are described by a |
| 2720 | parameterized string capability, |
| 2721 | with \fIprintf\fP-like escapes such as \fI%x\fP in it. |
| 2722 | For example, to address the cursor, the |
| 2723 | .B cup |
| 2724 | capability is given, using two parameters: |
| 2725 | the row and column to address to. |
| 2726 | (Rows and columns are numbered from zero and refer to the |
| 2727 | physical screen visible to the user, not to any unseen memory.) |
| 2728 | If the terminal has memory relative cursor addressing, |
| 2729 | that can be indicated by |
| 2730 | .BR mrcup . |
| 2731 | .PP |
| 2732 | The parameter mechanism uses a stack and special \fB%\fP codes |
| 2733 | to manipulate it. |
| 2734 | Typically a sequence will push one of the |
| 2735 | parameters onto the stack and then print it in some format. |
| 2736 | Print (e.g., \*(``%d\*('') is a special case. |
| 2737 | Other operations, including \*(``%t\*('' pop their operand from the stack. |
| 2738 | It is noted that more complex operations are often necessary, |
| 2739 | e.g., in the \fBsgr\fP string. |
| 2740 | .PP |
| 2741 | The \fB%\fP encodings have the following meanings: |
| 2742 | .TP 5 |
| 2743 | \fB%%\fP |
| 2744 | outputs \*(``%\*('' |
| 2745 | .TP |
| 2746 | \fB%\fI[[\fR:\fI]flags][width[.precision]][\fBdoxXs\fI]\fR |
| 2747 | as in \fBprintf\fP(3), flags are \fI[\-+#]\fP and \fIspace\fP. |
| 2748 | Use a \*(``:\*('' to allow the next character to be a \*(``\-\*('' flag, |
| 2749 | avoiding interpreting \*(``%\-\*('' as an operator. |
| 2750 | .TP |
| 2751 | \fB%c\fP |
| 2752 | print \fIpop()\fP like %c in \fBprintf\fP |
| 2753 | .TP |
| 2754 | \fB%s\fP |
| 2755 | print \fIpop()\fP like %s in \fBprintf\fP |
| 2756 | .TP |
| 2757 | \fB%p\fI[1\-9]\fR |
| 2758 | push \fIi\fP'th parameter |
| 2759 | .TP |
| 2760 | \fB%P\fI[a\-z]\fR |
| 2761 | set dynamic variable \fI[a\-z]\fP to \fIpop()\fP |
| 2762 | .TP |
| 2763 | \fB%g\fI[a\-z]\fR |
| 2764 | get dynamic variable \fI[a\-z]\fP and push it |
| 2765 | .TP |
| 2766 | \fB%P\fI[A\-Z]\fR |
| 2767 | set static variable \fI[a\-z]\fP to \fIpop()\fP |
| 2768 | .TP |
| 2769 | \fB%g\fI[A\-Z]\fR |
| 2770 | get static variable \fI[a\-z]\fP and push it |
| 2771 | .IP |
| 2772 | The terms \*(``static\*('' and \*(``dynamic\*('' are misleading. |
| 2773 | Historically, these are simply two different sets of variables, |
| 2774 | whose values are not reset between calls to \fBtparm\fP(3X). |
| 2775 | However, that fact is not documented in other implementations. |
| 2776 | Relying on it will adversely impact portability to other implementations: |
| 2777 | .RS |
| 2778 | .bP |
| 2779 | SVr2 curses supported \fIdynamic\fP variables. |
| 2780 | Those are set only by a \fB%P\fP operator. |
| 2781 | A \fB%g\fP for a given variable without first setting it with \fB%P\fP |
| 2782 | will give unpredictable results, because dynamic variables are |
| 2783 | an uninitialized local array on the stack in the \fBtparm\fP function. |
| 2784 | .bP |
| 2785 | SVr3.2 curses supported \fIstatic\fP variables. |
| 2786 | Those are an array in the \fI\%TERMINAL\fP |
| 2787 | structure (declared in \fBterm.h\fP), |
| 2788 | and are zeroed automatically when the \fBsetupterm\fP function |
| 2789 | allocates the data. |
| 2790 | .bP |
| 2791 | SVr4 curses made no further improvements |
| 2792 | to the \fIdynamic/static\fP variable feature. |
| 2793 | .bP |
| 2794 | Solaris XPG4 curses does not distinguish between \fIdynamic\fP and |
| 2795 | \fIstatic\fP variables. |
| 2796 | They are the same. |
| 2797 | Like SVr4 curses, XPG4 curses does not initialize these explicitly. |
| 2798 | .bP |
| 2799 | Before version 6.3, |
| 2800 | \fI\%ncurses\fP stores both \fIdynamic\fP and \fIstatic\fP |
| 2801 | variables in persistent storage, initialized to zeros. |
| 2802 | .bP |
| 2803 | Beginning with version 6.3, |
| 2804 | \fI\%ncurses\fP stores \fIstatic\fP and \fIdynamic\fP |
| 2805 | variables in the same manner as SVr4. |
| 2806 | .RS |
| 2807 | .bP |
| 2808 | Unlike other implementations, \fI\%ncurses\fP zeros dynamic variables |
| 2809 | before the first \fB%g\fP or \fB%P\fP operator. |
| 2810 | .bP |
| 2811 | Like SVr2, |
| 2812 | the scope of dynamic variables in \fI\%ncurses\fP |
| 2813 | is within the current call to |
| 2814 | \fBtparm\fP. |
| 2815 | Use static variables if persistent storage is needed. |
| 2816 | .RE |
| 2817 | .RE |
| 2818 | .TP |
| 2819 | \fB%\*'\fIc\fB\*'\fR |
| 2820 | char constant \fIc\fP |
| 2821 | .TP |
| 2822 | \fB%{\fInn\fB}\fR |
| 2823 | integer constant \fInn\fP |
| 2824 | .TP |
| 2825 | \fB%l\fP |
| 2826 | push strlen(pop) |
| 2827 | .TP |
| 2828 | \fB%+\fP, \fB%\-\fP, \fB%*\fP, \fB%/\fP, \fB%m\fP |
| 2829 | arithmetic (%m is \fImod\fP): \fIpush(pop() op pop())\fP |
| 2830 | .TP |
| 2831 | \fB%&\fP, \fB%|\fP, \fB%\*^\fP |
| 2832 | bit operations (AND, OR and exclusive-OR): \fIpush(pop() op pop())\fP |
| 2833 | .TP |
| 2834 | \fB%=\fP, \fB%>\fP, \fB%<\fP |
| 2835 | logical operations: \fIpush(pop() op pop())\fP |
| 2836 | .TP |
| 2837 | \fB%A\fP, \fB%O\fP |
| 2838 | logical AND and OR operations (for conditionals) |
| 2839 | .TP |
| 2840 | \fB%!\fP, \fB%\*~\fP |
| 2841 | unary operations (logical and bit complement): \fIpush(op pop())\fP |
| 2842 | .TP |
| 2843 | \fB%i\fP |
| 2844 | add 1 to first two parameters (for ANSI terminals) |
| 2845 | .TP |
| 2846 | \fB%?\fP \fIexpr\fP \fB%t\fP \fIthenpart\fP \fB%e\fP \fIelsepart\fP \fB%;\fP |
| 2847 | This forms an if-then-else. |
| 2848 | The \fB%e\fP \fIelsepart\fP is optional. |
| 2849 | Usually the \fB%?\fP \fIexpr\fP part pushes a value onto the stack, |
| 2850 | and \fB%t\fP pops it from the stack, testing if it is nonzero (true). |
| 2851 | If it is zero (false), control passes to the \fB%e\fP (else) part. |
| 2852 | .IP |
| 2853 | It is possible to form else-if's a la Algol 68: |
| 2854 | .RS |
| 2855 | \fB%?\fP c\d1\u \fB%t\fP b\d1\u \fB%e\fP c\d2\u \fB%t\fP b\d2\u \fB%e\fP c\d3\u \fB%t\fP b\d3\u \fB%e\fP c\d4\u \fB%t\fP b\d4\u \fB%e\fP \fB%;\fP |
| 2856 | .RE |
| 2857 | .IP |
| 2858 | where c\di\u are conditions, b\di\u are bodies. |
| 2859 | .IP |
| 2860 | Use the \fB\-f\fP option of \fB@TIC@\fP or \fB@INFOCMP@\fP to see |
| 2861 | the structure of if-then-else's. |
| 2862 | Some strings, e.g., \fBsgr\fP can be very complicated when written |
| 2863 | on one line. |
| 2864 | The \fB\-f\fP option splits the string into lines with the parts indented. |
| 2865 | .PP |
| 2866 | Binary operations are in postfix form with the operands in the usual order. |
| 2867 | That is, to get x\-5 one would use \*(``%gx%{5}%\-\*(''. |
| 2868 | \fB%P\fP and \fB%g\fP variables are |
| 2869 | persistent across escape-string evaluations. |
| 2870 | .PP |
| 2871 | Consider the HP2645, which, to get to row 3 and column 12, needs |
| 2872 | to be sent \eE&a12c03Y padded for 6 milliseconds. |
| 2873 | The order of the rows and columns is inverted here, |
| 2874 | and the row and column are printed as two digits. |
| 2875 | The corresponding terminal description is expressed thus: |
| 2876 | .RS |
| 2877 | cup=\eE&a%p2%dc%p1%dY$<6>, |
| 2878 | .RE |
| 2879 | .PP |
| 2880 | The Microterm \s-1ACT-IV\s0 needs the current row and column sent |
| 2881 | preceded by a \fB\*^T\fP, with the row and column simply encoded in binary, |
| 2882 | .RS |
| 2883 | cup=\*^T%p1%c%p2%c |
| 2884 | .RE |
| 2885 | .PP |
| 2886 | Terminals which use \*(``%c\*('' need to be able to |
| 2887 | backspace the cursor (\fBcub1\fP), |
| 2888 | and to move the cursor up one line on the screen (\fBcuu1\fP). |
| 2889 | This is necessary because it is not always safe to transmit \fB\en\fP |
| 2890 | \fB\*^D\fP and \fB\er\fP, as the system may change or discard them. |
| 2891 | (The library routines dealing with terminfo set tty modes so that |
| 2892 | tabs are never expanded, so \et is safe to send. |
| 2893 | This turns out to be essential for the Ann Arbor 4080.) |
| 2894 | .PP |
| 2895 | A final example is the \s-1LSI ADM\s0-3a, which uses row and column |
| 2896 | offset by a blank character, thus |
| 2897 | .RS |
| 2898 | cup=\eE=%p1%\*' \*'%+%c%p2%\*' \*'%+%c |
| 2899 | .RE |
| 2900 | .PP |
| 2901 | After sending \*(``\eE=\*('', this pushes the first parameter, pushes the |
| 2902 | ASCII value for a space (32), adds them (pushing the sum on the stack |
| 2903 | in place of the two previous values) and outputs that value as a character. |
| 2904 | Then the same is done for the second parameter. |
| 2905 | More complex arithmetic is possible using the stack. |
| 2906 | .SS "Cursor Motions" |
| 2907 | If the terminal has a fast way to home the cursor |
| 2908 | (to very upper left corner of screen) then this can be given as |
| 2909 | \fBhome\fP; similarly a fast way of getting to the lower left-hand corner |
| 2910 | can be given as \fBll\fP; this may involve going up with \fBcuu1\fP |
| 2911 | from the home position, |
| 2912 | but a program should never do this itself (unless \fBll\fP does) because it |
| 2913 | can make no assumption about the effect of moving up from the home position. |
| 2914 | Note that the home position is the same as addressing to (0,0): |
| 2915 | to the top left corner of the screen, not of memory. |
| 2916 | (Thus, the \eEH sequence on HP terminals cannot be used for |
| 2917 | .BR home .) |
| 2918 | .PP |
| 2919 | If the terminal has row or column absolute cursor addressing, |
| 2920 | these can be given as single parameter capabilities |
| 2921 | .B hpa |
| 2922 | (horizontal position absolute) |
| 2923 | and |
| 2924 | .B vpa |
| 2925 | (vertical position absolute). |
| 2926 | Sometimes these are shorter than the more general two parameter |
| 2927 | sequence (as with the hp2645) and can be used in preference to |
| 2928 | .BR cup . |
| 2929 | If there are parameterized local motions (e.g., move |
| 2930 | .I n |
| 2931 | spaces to the right) these can be given as |
| 2932 | .BR cud , |
| 2933 | .BR cub , |
| 2934 | .BR cuf , |
| 2935 | and |
| 2936 | .B cuu |
| 2937 | with a single parameter indicating how many spaces to move. |
| 2938 | These are primarily useful if the terminal does not have |
| 2939 | .BR cup , |
| 2940 | such as the \s-1TEKTRONIX\s+1 4025. |
| 2941 | .PP |
| 2942 | If the terminal needs to be in a special mode when running |
| 2943 | a program that uses these capabilities, |
| 2944 | the codes to enter and exit this mode can be given |
| 2945 | as \fBsmcup\fP and \fBrmcup\fP. |
| 2946 | This arises, for example, from terminals like the Concept with more than |
| 2947 | one page of memory. |
| 2948 | If the terminal has only memory relative cursor addressing and not screen |
| 2949 | relative cursor addressing, a one screen-sized window must be fixed into |
| 2950 | the terminal for cursor addressing to work properly. |
| 2951 | This is also used for the \s-1TEKTRONIX\s+1 4025, |
| 2952 | where |
| 2953 | .B smcup |
| 2954 | sets the command character to be the one used by terminfo. |
| 2955 | If the \fBsmcup\fP sequence will not restore the screen after an |
| 2956 | \fBrmcup\fP sequence is output (to the state prior to outputting |
| 2957 | \fBrmcup\fP), specify \fBnrrmc\fP. |
| 2958 | .SS Margins |
| 2959 | SVr4 (and X/Open Curses) |
| 2960 | list several string capabilities for setting margins. |
| 2961 | Two were intended for use with terminals, |
| 2962 | and another six were intended for use with printers. |
| 2963 | .bP |
| 2964 | The two terminal capabilities assume that the terminal may have |
| 2965 | the capability of setting the left and/or right margin at the current |
| 2966 | cursor column position. |
| 2967 | .bP |
| 2968 | The printer capabilities assume that the printer may have |
| 2969 | two types of capability: |
| 2970 | .RS |
| 2971 | .bP |
| 2972 | the ability to set a top and/or bottom margin using the current |
| 2973 | line position, and |
| 2974 | .bP |
| 2975 | parameterized capabilities for setting the top, bottom, left, right margins |
| 2976 | given the number of rows or columns. |
| 2977 | .RE |
| 2978 | .PP |
| 2979 | In practice, the categorization into \*(``terminal\*('' and \*(``printer\*('' |
| 2980 | is not suitable: |
| 2981 | .bP |
| 2982 | The AT&T SVr4 terminal database uses \fBsmgl\fP four times, |
| 2983 | for AT&T hardware. |
| 2984 | .IP |
| 2985 | Three of the four are printers. |
| 2986 | They lack the ability to set left/right margins by specifying the column. |
| 2987 | .bP |
| 2988 | Other (non-AT&T) terminals may support margins |
| 2989 | but using different assumptions from AT&T. |
| 2990 | .IP |
| 2991 | For instance, the DEC VT420 supports left/right margins, |
| 2992 | but only using a column parameter. |
| 2993 | As an added complication, the VT420 uses two settings to fully enable |
| 2994 | left/right margins (left/right margin mode, and origin mode). |
| 2995 | The former enables the margins, which causes printed text |
| 2996 | to wrap within margins, but the latter is needed to prevent |
| 2997 | cursor-addressing outside those margins. |
| 2998 | .bP |
| 2999 | Both DEC VT420 left/right margins are set with a single control sequence. |
| 3000 | If either is omitted, the corresponding margin is set to the left or |
| 3001 | right edge of the display (rather than leaving the margin unmodified). |
| 3002 | .PP |
| 3003 | These are the margin-related capabilities: |
| 3004 | .PP |
| 3005 | .TS |
| 3006 | center; |
| 3007 | lb lb |
| 3008 | lb l . |
| 3009 | Name Description |
| 3010 | _ |
| 3011 | smgl Set left margin at current column |
| 3012 | smgr Set right margin at current column |
| 3013 | smgb Set bottom margin at current line |
| 3014 | smgt Set top margin at current line |
| 3015 | smgbp Set bottom margin at line \fIN\fP |
| 3016 | smglp Set left margin at column \fIN\fP |
| 3017 | smgrp Set right margin at column \fIN\fP |
| 3018 | smgtp Set top margin at line \fIN\fP |
| 3019 | smglr Set both left and right margins to \fIL\fP and \fIR\fP |
| 3020 | smgtb Set both top and bottom margins to \fIT\fP and \fIB\fP |
| 3021 | .TE |
| 3022 | .PP |
| 3023 | When writing an application that |
| 3024 | uses these string capabilities, |
| 3025 | the pairs should be first checked to see |
| 3026 | if each capability in the pair is set or only one is set: |
| 3027 | .bP |
| 3028 | If both \fBsmglp\fP and \fBsmgrp\fP are set, |
| 3029 | each is used with a single argument, \fIN\fP, |
| 3030 | that gives the column number of the left and right margin, respectively. |
| 3031 | .bP |
| 3032 | If both \fBsmgtp\fP and \fBsmgbp\fP are set, |
| 3033 | each is used to set the top and bottom margin, |
| 3034 | respectively: |
| 3035 | .RS 4 |
| 3036 | .bP |
| 3037 | \fBsmgtp\fP is used with a single argument, \fIN\fP, |
| 3038 | the line number of the top margin. |
| 3039 | .bP |
| 3040 | \fBsmgbp\fP is used with two arguments, \fIN\fP and \fIM\fP, |
| 3041 | that give the line number of the bottom margin, |
| 3042 | the first counting from the top of the |
| 3043 | page and the second counting from the bottom. |
| 3044 | This accommodates the two styles of specifying |
| 3045 | the bottom margin in different manufacturers' printers. |
| 3046 | .RE |
| 3047 | .IP |
| 3048 | When designing a terminfo entry for a |
| 3049 | printer that has a settable bottom margin, |
| 3050 | only the first or second argument should be used, depending on the printer. |
| 3051 | When developing an application that uses \fBsmgbp\fP to set the bottom margin, |
| 3052 | both arguments must be given. |
| 3053 | .PP |
| 3054 | Conversely, when only one capability in the pair is set: |
| 3055 | .bP |
| 3056 | If only one of \fBsmglp\fP and \fBsmgrp\fP is set, |
| 3057 | then it is used with two arguments, |
| 3058 | the column number of the left and right margins, in that order. |
| 3059 | .bP |
| 3060 | Likewise, if only one of \fBsmgtp\fP and \fBsmgbp\fP is set, then it |
| 3061 | is used with two arguments that give the top and bottom margins, |
| 3062 | in that order, counting from the top of the page. |
| 3063 | .IP |
| 3064 | When designing a terminfo entry for a printer that requires setting both |
| 3065 | left and right or top and bottom margins simultaneously, |
| 3066 | only one capability in the pairs |
| 3067 | \fBsmglp\fP and \fBsmgrp\fP or |
| 3068 | \fBsmgtp\fP and \fBsmgbp\fP should be defined, |
| 3069 | leaving the other unset. |
| 3070 | .PP |
| 3071 | Except for very old terminal descriptions, e.g., those developed for SVr4, |
| 3072 | the scheme just described should be considered obsolete. |
| 3073 | An improved set of capabilities was added late in the SVr4 releases |
| 3074 | (\fBsmglr\fP and \fBsmgtb\fP), |
| 3075 | which explicitly use two parameters for setting the left/right or top/bottom |
| 3076 | margins. |
| 3077 | .PP |
| 3078 | When setting margins, the line- and column-values are zero-based. |
| 3079 | .PP |
| 3080 | The \fBmgc\fP string capability should be defined. |
| 3081 | Applications such as \fBtabs\fP(1) rely upon this to reset all margins. |
| 3082 | .\" |
| 3083 | .SS "Area Clears" |
| 3084 | If the terminal can clear from the current position to the end of the |
| 3085 | line, leaving the cursor where it is, this should be given as \fBel\fP. |
| 3086 | If the terminal can clear from the beginning of the line to the current |
| 3087 | position inclusive, leaving |
| 3088 | the cursor where it is, this should be given as \fBel1\fP. |
| 3089 | If the terminal can clear from the current position to the end of the |
| 3090 | display, then this should be given as \fBed\fP. |
| 3091 | \fBEd\fP is only defined from the first column of a line. |
| 3092 | (Thus, it can be simulated by a request to delete a large number of lines, |
| 3093 | if a true |
| 3094 | .B ed |
| 3095 | is not available.) |
| 3096 | .\" |
| 3097 | .SS "Insert/Delete Line and Vertical Motions" |
| 3098 | If the terminal can open a new blank line before the line where the cursor |
| 3099 | is, this should be given as \fBil1\fP; this is done only from the first |
| 3100 | position of a line. |
| 3101 | The cursor must then appear on the newly blank line. |
| 3102 | If the terminal can delete the line which the cursor is on, then this |
| 3103 | should be given as \fBdl1\fP; this is done only from the first position on |
| 3104 | the line to be deleted. |
| 3105 | Versions of |
| 3106 | .B il1 |
| 3107 | and |
| 3108 | .B dl1 |
| 3109 | which take a single parameter and insert or delete that many lines can |
| 3110 | be given as |
| 3111 | .B il |
| 3112 | and |
| 3113 | .BR dl . |
| 3114 | .PP |
| 3115 | If the terminal has a settable scrolling region (like the vt100) |
| 3116 | the command to set this can be described with the |
| 3117 | .B csr |
| 3118 | capability, which takes two parameters: |
| 3119 | the top and bottom lines of the scrolling region. |
| 3120 | The cursor position is, alas, undefined after using this command. |
| 3121 | .PP |
| 3122 | It is possible to get the effect of insert or delete line using |
| 3123 | .B csr |
| 3124 | on a properly chosen region; the |
| 3125 | .B sc |
| 3126 | and |
| 3127 | .B rc |
| 3128 | (save and restore cursor) commands may be useful for ensuring that |
| 3129 | your synthesized insert/delete string does not move the cursor. |
| 3130 | (Note that the \fB\%ncurses\fP(3X) library does this synthesis |
| 3131 | automatically, so you need not compose insert/delete strings for |
| 3132 | an entry with \fBcsr\fP). |
| 3133 | .PP |
| 3134 | Yet another way to construct insert and delete might be to use a combination of |
| 3135 | index with the memory-lock feature found on some terminals (like the HP-700/90 |
| 3136 | series, which however also has insert/delete). |
| 3137 | .PP |
| 3138 | Inserting lines at the top or bottom of the screen can also be |
| 3139 | done using |
| 3140 | .B ri |
| 3141 | or |
| 3142 | .B ind |
| 3143 | on many terminals without a true insert/delete line, |
| 3144 | and is often faster even on terminals with those features. |
| 3145 | .PP |
| 3146 | The Boolean \fBnon_dest_scroll_region\fP should be set if each scrolling |
| 3147 | window is effectively a view port on a screen-sized canvas. |
| 3148 | To test for |
| 3149 | this capability, create a scrolling region in the middle of the screen, |
| 3150 | write something to the bottom line, move the cursor to the top of the region, |
| 3151 | and do \fBri\fP followed by \fBdl1\fP or \fBind\fP. |
| 3152 | If the data scrolled |
| 3153 | off the bottom of the region by the \fBri\fP re-appears, then scrolling |
| 3154 | is non-destructive. |
| 3155 | System V and X/Open Curses expect that \fBind\fP, \fBri\fP, |
| 3156 | \fBindn\fP, and \fBrin\fP will simulate destructive scrolling; their |
| 3157 | documentation cautions you not to define \fBcsr\fP unless this is true. |
| 3158 | This \fBcurses\fP implementation is more liberal and will do explicit erases |
| 3159 | after scrolling if \fBndsrc\fP is defined. |
| 3160 | .PP |
| 3161 | If the terminal has the ability to define a window as part of |
| 3162 | memory, which all commands affect, |
| 3163 | it should be given as the parameterized string |
| 3164 | .BR wind . |
| 3165 | The four parameters are the starting and ending lines in memory |
| 3166 | and the starting and ending columns in memory, in that order. |
| 3167 | .PP |
| 3168 | If the terminal can retain display memory above, then the |
| 3169 | \fBda\fP capability should be given; if display memory can be retained |
| 3170 | below, then \fBdb\fP should be given. |
| 3171 | These indicate |
| 3172 | that deleting a line or scrolling may bring non-blank lines up from below |
| 3173 | or that scrolling back with \fBri\fP may bring down non-blank lines. |
| 3174 | .SS "Insert/Delete Character" |
| 3175 | There are two basic kinds of intelligent terminals with respect to |
| 3176 | insert/delete character which can be described using |
| 3177 | .IR terminfo . |
| 3178 | The most common insert/delete character operations affect only the characters |
| 3179 | on the current line and shift characters off the end of the line rigidly. |
| 3180 | Other terminals, such as the Concept 100 and the Perkin Elmer Owl, make |
| 3181 | a distinction between typed and untyped blanks on the screen, shifting |
| 3182 | upon an insert or delete only to an untyped blank on the screen which is |
| 3183 | either eliminated, or expanded to two untyped blanks. |
| 3184 | .PP |
| 3185 | You can determine the |
| 3186 | kind of terminal you have by clearing the screen and then typing |
| 3187 | text separated by cursor motions. |
| 3188 | Type \*(``abc\ \ \ \ def\*('' using local |
| 3189 | cursor motions (not spaces) between the \*(``abc\*('' and the \*(``def\*(''. |
| 3190 | Then position the cursor before the \*(``abc\*('' and put the terminal in insert |
| 3191 | mode. |
| 3192 | If typing characters causes the rest of the line to shift |
| 3193 | rigidly and characters to fall off the end, then your terminal does |
| 3194 | not distinguish between blanks and untyped positions. |
| 3195 | If the \*(``abc\*('' |
| 3196 | shifts over to the \*(``def\*('' which then move together around the end of the |
| 3197 | current line and onto the next as you insert, you have the second type of |
| 3198 | terminal, and should give the capability \fBin\fP, which stands for |
| 3199 | \*(``insert null\*(''. |
| 3200 | .PP |
| 3201 | While these are two logically separate attributes (one line versus multi-line |
| 3202 | insert mode, and special treatment of untyped spaces) we have seen no |
| 3203 | terminals whose insert mode cannot be described with the single attribute. |
| 3204 | .PP |
| 3205 | Terminfo can describe both terminals which have an insert mode, and terminals |
| 3206 | which send a simple sequence to open a blank position on the current line. |
| 3207 | Give as \fBsmir\fP the sequence to get into insert mode. |
| 3208 | Give as \fBrmir\fP the sequence to leave insert mode. |
| 3209 | Now give as \fBich1\fP any sequence needed to be sent just before sending |
| 3210 | the character to be inserted. |
| 3211 | Most terminals with a true insert mode |
| 3212 | will not give \fBich1\fP; terminals which send a sequence to open a screen |
| 3213 | position should give it here. |
| 3214 | .PP |
| 3215 | If your terminal has both, insert mode is usually preferable to \fBich1\fP. |
| 3216 | Technically, you should not give both unless the terminal actually requires |
| 3217 | both to be used in combination. |
| 3218 | Accordingly, some non-curses applications get |
| 3219 | confused if both are present; the symptom is doubled characters in an update |
| 3220 | using insert. |
| 3221 | This requirement is now rare; most \fBich\fP sequences do not |
| 3222 | require previous smir, and most smir insert modes do not require \fBich1\fP |
| 3223 | before each character. |
| 3224 | Therefore, the new \fBcurses\fP actually assumes this |
| 3225 | is the case and uses either \fBrmir\fP/\fBsmir\fP or \fBich\fP/\fBich1\fP as |
| 3226 | appropriate (but not both). |
| 3227 | If you have to write an entry to be used under |
| 3228 | new curses for a terminal old enough to need both, include the |
| 3229 | \fBrmir\fP/\fBsmir\fP sequences in \fBich1\fP. |
| 3230 | .PP |
| 3231 | If post insert padding is needed, give this as a number of milliseconds |
| 3232 | in \fBip\fP (a string option). |
| 3233 | Any other sequence which may need to be |
| 3234 | sent after an insert of a single character may also be given in \fBip\fP. |
| 3235 | If your terminal needs both to be placed into an \*(``insert mode\*('' and |
| 3236 | a special code to precede each inserted character, then both |
| 3237 | .BR smir / rmir |
| 3238 | and |
| 3239 | .B ich1 |
| 3240 | can be given, and both will be used. |
| 3241 | The |
| 3242 | .B ich |
| 3243 | capability, with one parameter, |
| 3244 | .IR n , |
| 3245 | will repeat the effects of |
| 3246 | .B ich1 |
| 3247 | .I n |
| 3248 | times. |
| 3249 | .PP |
| 3250 | If padding is necessary between characters typed while not |
| 3251 | in insert mode, give this as a number of milliseconds padding in \fBrmp\fP. |
| 3252 | .PP |
| 3253 | It is occasionally necessary to move around while in insert mode |
| 3254 | to delete characters on the same line (e.g., if there is a tab after |
| 3255 | the insertion position). |
| 3256 | If your terminal allows motion while in |
| 3257 | insert mode you can give the capability \fBmir\fP to speed up inserting |
| 3258 | in this case. |
| 3259 | Omitting \fBmir\fP will affect only speed. |
| 3260 | Some terminals |
| 3261 | (notably Datamedia's) must not have \fBmir\fP because of the way their |
| 3262 | insert mode works. |
| 3263 | .PP |
| 3264 | Finally, you can specify |
| 3265 | .B dch1 |
| 3266 | to delete a single character, |
| 3267 | .B dch |
| 3268 | with one parameter, |
| 3269 | .IR n , |
| 3270 | to delete |
| 3271 | .IR n "characters," |
| 3272 | and delete mode by giving \fBsmdc\fP and \fBrmdc\fP |
| 3273 | to enter and exit delete mode (any mode the terminal needs to be placed |
| 3274 | in for |
| 3275 | .B dch1 |
| 3276 | to work). |
| 3277 | .PP |
| 3278 | A command to erase |
| 3279 | .I n |
| 3280 | characters (equivalent to outputting |
| 3281 | .I n |
| 3282 | blanks without moving the cursor) |
| 3283 | can be given as |
| 3284 | .B ech |
| 3285 | with one parameter. |
| 3286 | .SS "Highlighting, Underlining, and Visible Bells" |
| 3287 | If your terminal has one or more kinds of display attributes, |
| 3288 | these can be represented in a number of different ways. |
| 3289 | You should choose one display form as |
| 3290 | \f2standout mode\fP, |
| 3291 | representing a good, high contrast, easy-on-the-eyes, |
| 3292 | format for highlighting error messages and other attention getters. |
| 3293 | (If you have a choice, reverse video plus half-bright is good, |
| 3294 | or reverse video alone.) |
| 3295 | The sequences to enter and exit standout mode |
| 3296 | are given as \fBsmso\fP and \fBrmso\fP, respectively. |
| 3297 | If the code to change into or out of standout |
| 3298 | mode leaves one or even two blank spaces on the screen, |
| 3299 | as the TVI 912 and Teleray 1061 do, |
| 3300 | then \fBxmc\fP should be given to tell how many spaces are left. |
| 3301 | .PP |
| 3302 | Codes to begin underlining and end underlining can be given as \fBsmul\fP |
| 3303 | and \fBrmul\fP respectively. |
| 3304 | If the terminal has a code to underline the current character and move |
| 3305 | the cursor one space to the right, |
| 3306 | such as the Microterm Mime, |
| 3307 | this can be given as \fBuc\fP. |
| 3308 | .PP |
| 3309 | Other capabilities to enter various highlighting modes include |
| 3310 | .B blink |
| 3311 | (blinking) |
| 3312 | .B bold |
| 3313 | (bold or extra bright) |
| 3314 | .B dim |
| 3315 | (dim or half-bright) |
| 3316 | .B invis |
| 3317 | (blanking or invisible text) |
| 3318 | .B prot |
| 3319 | (protected) |
| 3320 | .B rev |
| 3321 | (reverse video) |
| 3322 | .B sgr0 |
| 3323 | (turn off |
| 3324 | .I all |
| 3325 | attribute modes) |
| 3326 | .B smacs |
| 3327 | (enter alternate character set mode) |
| 3328 | and |
| 3329 | .B rmacs |
| 3330 | (exit alternate character set mode). |
| 3331 | Turning on any of these modes singly may or may not turn off other modes. |
| 3332 | .PP |
| 3333 | If there is a sequence to set arbitrary combinations of modes, |
| 3334 | this should be given as |
| 3335 | .B sgr |
| 3336 | (set attributes), |
| 3337 | taking 9 parameters. |
| 3338 | Each parameter is either zero (0) or nonzero, |
| 3339 | as the corresponding attribute is on or off. |
| 3340 | The 9 parameters are, in order: |
| 3341 | standout, underline, reverse, blink, dim, bold, blank, protect, alternate |
| 3342 | character set. |
| 3343 | Not all modes need be supported by |
| 3344 | .BR sgr , |
| 3345 | only those for which corresponding separate attribute commands exist. |
| 3346 | .PP |
| 3347 | For example, the DEC vt220 supports most of the modes: |
| 3348 | .PP |
| 3349 | .TS |
| 3350 | center; |
| 3351 | lb lb lb |
| 3352 | l l l . |
| 3353 | tparm Parameter Attribute Escape Sequence |
| 3354 | _ |
| 3355 | none none \eE[0m |
| 3356 | p1 standout \eE[0;1;7m |
| 3357 | p2 underline \eE[0;4m |
| 3358 | p3 reverse \eE[0;7m |
| 3359 | p4 blink \eE[0;5m |
| 3360 | p5 dim not available |
| 3361 | p6 bold \eE[0;1m |
| 3362 | p7 invis \eE[0;8m |
| 3363 | p8 protect not used |
| 3364 | p9 altcharset \*^O (off) \*^N (on) |
| 3365 | .TE |
| 3366 | .PP |
| 3367 | We begin each escape sequence by turning off any existing modes, since |
| 3368 | there is no quick way to determine whether they are active. |
| 3369 | Standout is set up to be the combination of reverse and bold. |
| 3370 | The vt220 terminal has a protect mode, |
| 3371 | though it is not commonly used in sgr |
| 3372 | because it protects characters on the screen from the host's erasures. |
| 3373 | The altcharset mode also is different in that it is either \*^O or \*^N, |
| 3374 | depending on whether it is off or on. |
| 3375 | If all modes are turned on, the resulting sequence is \eE[0;1;4;5;7;8m\*^N. |
| 3376 | .PP |
| 3377 | Some sequences are common to different modes. |
| 3378 | For example, ;7 is output when either p1 or p3 is true, that is, if |
| 3379 | either standout or reverse modes are turned on. |
| 3380 | .PP |
| 3381 | Writing out the above sequences, along with their dependencies yields |
| 3382 | .PP |
| 3383 | .ne 11 |
| 3384 | .TS |
| 3385 | center; |
| 3386 | lb lb lb |
| 3387 | l l l . |
| 3388 | Sequence When to Output terminfo Translation |
| 3389 | _ |
| 3390 | \eE[0 always \eE[0 |
| 3391 | ;1 if p1 or p6 %?%p1%p6%|%t;1%; |
| 3392 | ;4 if p2 %?%p2%|%t;4%; |
| 3393 | ;5 if p4 %?%p4%|%t;5%; |
| 3394 | ;7 if p1 or p3 %?%p1%p3%|%t;7%; |
| 3395 | ;8 if p7 %?%p7%|%t;8%; |
| 3396 | m always m |
| 3397 | \*^N or \*^O if p9 \*^N, else \*^O %?%p9%t\*^N%e\*^O%; |
| 3398 | .TE |
| 3399 | .PP |
| 3400 | Putting this all together into the sgr sequence gives: |
| 3401 | .PP |
| 3402 | .EX |
| 3403 | sgr=\eE[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p4%t;5%; |
| 3404 | %?%p1%p3%|%t;7%;%?%p7%t;8%;m%?%p9%t\e016%e\e017%;, |
| 3405 | .EE |
| 3406 | .PP |
| 3407 | Remember that if you specify sgr, you must also specify sgr0. |
| 3408 | Also, some implementations rely on sgr being given if sgr0 is, |
| 3409 | Not all terminfo entries necessarily have an sgr string, however. |
| 3410 | Many terminfo entries are derived from termcap entries |
| 3411 | which have no sgr string. |
| 3412 | The only drawback to adding an sgr string is that termcap also |
| 3413 | assumes that sgr0 does not exit alternate character set mode. |
| 3414 | .PP |
| 3415 | Terminals with the \*(``magic cookie\*('' glitch |
| 3416 | .RB ( xmc ) |
| 3417 | deposit special \*(``cookies\*('' when they receive mode-setting sequences, |
| 3418 | which affect the display algorithm rather than having extra bits for |
| 3419 | each character. |
| 3420 | Some terminals, such as the HP 2621, automatically leave standout |
| 3421 | mode when they move to a new line or the cursor is addressed. |
| 3422 | Programs using standout mode should exit standout mode before |
| 3423 | moving the cursor or sending a newline, |
| 3424 | unless the |
| 3425 | .B msgr |
| 3426 | capability, asserting that it is safe to move in standout mode, is present. |
| 3427 | .PP |
| 3428 | If the terminal has |
| 3429 | a way of flashing the screen to indicate an error quietly (a bell replacement) |
| 3430 | then this can be given as \fBflash\fP; it must not move the cursor. |
| 3431 | .PP |
| 3432 | If the cursor needs to be made more visible than normal when it is |
| 3433 | not on the bottom line (to make, for example, a non-blinking underline into an |
| 3434 | easier to find block or blinking underline) |
| 3435 | give this sequence as |
| 3436 | .BR cvvis . |
| 3437 | If there is a way to make the cursor completely invisible, give that as |
| 3438 | .BR civis . |
| 3439 | The capability |
| 3440 | .B cnorm |
| 3441 | should be given which undoes the effects of both of these modes. |
| 3442 | .PP |
| 3443 | If your terminal correctly generates underlined characters |
| 3444 | (with no special codes needed) |
| 3445 | even though it does not overstrike, |
| 3446 | then you should give the capability \fBul\fP. |
| 3447 | If a character overstriking another leaves both characters on the screen, |
| 3448 | specify the capability \fBos\fP. |
| 3449 | If overstrikes are erasable with a blank, |
| 3450 | then this should be indicated by giving \fBeo\fP. |
| 3451 | .SS "Keypad and Function Keys" |
| 3452 | If the terminal has a keypad that transmits codes when the keys are pressed, |
| 3453 | this information can be given. |
| 3454 | Note that it is not possible to handle |
| 3455 | terminals where the keypad only works in local (this applies, for example, |
| 3456 | to the unshifted HP 2621 keys). |
| 3457 | If the keypad can be set to transmit or not transmit, |
| 3458 | give these codes as \fBsmkx\fP and \fBrmkx\fP. |
| 3459 | Otherwise the keypad is assumed to always transmit. |
| 3460 | .PP |
| 3461 | The codes sent by the left arrow, right arrow, up arrow, down arrow, |
| 3462 | and home keys can be given as |
| 3463 | \fBkcub1, kcuf1, kcuu1, kcud1, \fRand\fB khome\fP respectively. |
| 3464 | If there are function keys such as f0, f1, ..., f10, the codes they send |
| 3465 | can be given as \fBkf0, kf1, ..., kf10\fP. |
| 3466 | If these keys have labels other than the default f0 through f10, the labels |
| 3467 | can be given as \fBlf0, lf1, ..., lf10\fP. |
| 3468 | .PP |
| 3469 | The codes transmitted by certain other special keys can be given: |
| 3470 | .bP |
| 3471 | .B kll |
| 3472 | (home down), |
| 3473 | .bP |
| 3474 | .B kbs |
| 3475 | (backspace), |
| 3476 | .bP |
| 3477 | .B ktbc |
| 3478 | (clear all tabs), |
| 3479 | .bP |
| 3480 | .B kctab |
| 3481 | (clear the tab stop in this column), |
| 3482 | .bP |
| 3483 | .B kclr |
| 3484 | (clear screen or erase key), |
| 3485 | .bP |
| 3486 | .B kdch1 |
| 3487 | (delete character), |
| 3488 | .bP |
| 3489 | .B kdl1 |
| 3490 | (delete line), |
| 3491 | .bP |
| 3492 | .B krmir |
| 3493 | (exit insert mode), |
| 3494 | .bP |
| 3495 | .B kel |
| 3496 | (clear to end of line), |
| 3497 | .bP |
| 3498 | .B ked |
| 3499 | (clear to end of screen), |
| 3500 | .bP |
| 3501 | .B kich1 |
| 3502 | (insert character or enter insert mode), |
| 3503 | .bP |
| 3504 | .B kil1 |
| 3505 | (insert line), |
| 3506 | .bP |
| 3507 | .B knp |
| 3508 | (next page), |
| 3509 | .bP |
| 3510 | .B kpp |
| 3511 | (previous page), |
| 3512 | .bP |
| 3513 | .B kind |
| 3514 | (scroll forward/down), |
| 3515 | .bP |
| 3516 | .B kri |
| 3517 | (scroll backward/up), |
| 3518 | .bP |
| 3519 | .B khts |
| 3520 | (set a tab stop in this column). |
| 3521 | .PP |
| 3522 | In addition, if the keypad has a 3 by 3 array of keys including the four |
| 3523 | arrow keys, the other five keys can be given as |
| 3524 | .BR ka1 , |
| 3525 | .BR ka3 , |
| 3526 | .BR kb2 , |
| 3527 | .BR kc1 , |
| 3528 | and |
| 3529 | .BR kc3 . |
| 3530 | These keys are useful when the effects of a 3 by 3 directional pad are needed. |
| 3531 | .PP |
| 3532 | Strings to program function keys can be given as |
| 3533 | .BR pfkey , |
| 3534 | .BR pfloc , |
| 3535 | and |
| 3536 | .BR pfx . |
| 3537 | A string to program screen labels should be specified as \fBpln\fP. |
| 3538 | Each of these strings takes two parameters: the function key number to |
| 3539 | program (from 0 to 10) and the string to program it with. |
| 3540 | Function key numbers out of this range may program undefined keys in |
| 3541 | a terminal dependent manner. |
| 3542 | The difference between the capabilities is that |
| 3543 | .B pfkey |
| 3544 | causes pressing the given key to be the same as the user typing the |
| 3545 | given string; |
| 3546 | .B pfloc |
| 3547 | causes the string to be executed by the terminal in local; and |
| 3548 | .B pfx |
| 3549 | causes the string to be transmitted to the computer. |
| 3550 | .PP |
| 3551 | The capabilities \fBnlab\fP, \fBlw\fP and \fBlh\fP |
| 3552 | define the number of programmable |
| 3553 | screen labels and their width and height. |
| 3554 | If there are commands to turn the labels on and off, |
| 3555 | give them in \fBsmln\fP and \fBrmln\fP. |
| 3556 | \fBsmln\fP is normally output after one or more pln |
| 3557 | sequences to make sure that the change becomes visible. |
| 3558 | .SS "Tabs and Initialization" |
| 3559 | A few capabilities are used only for tabs: |
| 3560 | .bP |
| 3561 | If the terminal has hardware tabs, the command to advance to the next |
| 3562 | tab stop can be given as |
| 3563 | .B ht |
| 3564 | (usually control/I). |
| 3565 | .bP |
| 3566 | A \*(``back-tab\*('' command which moves leftward to the preceding tab stop can |
| 3567 | be given as |
| 3568 | .BR cbt . |
| 3569 | .IP |
| 3570 | By convention, if the teletype modes indicate that tabs are being |
| 3571 | expanded by the computer rather than being sent to the terminal, |
| 3572 | programs should not use |
| 3573 | .B ht |
| 3574 | or |
| 3575 | .B cbt |
| 3576 | even if they are present, since the user may not have the tab stops |
| 3577 | properly set. |
| 3578 | .bP |
| 3579 | If the terminal has hardware tabs which are initially set every |
| 3580 | .I n |
| 3581 | spaces when the terminal is powered up, |
| 3582 | the numeric parameter |
| 3583 | .B it |
| 3584 | is given, showing the number of spaces the tabs are set to. |
| 3585 | .IP |
| 3586 | The \fBit\fP capability is normally used by the \fB@TSET@\fP |
| 3587 | command to determine whether to set the mode for hardware tab expansion, |
| 3588 | and whether to set the tab stops. |
| 3589 | If the terminal has tab stops that can be saved in non-volatile memory, |
| 3590 | the terminfo description can assume that they are properly set. |
| 3591 | .PP |
| 3592 | Other capabilities |
| 3593 | include |
| 3594 | .bP |
| 3595 | .BR is1 , |
| 3596 | .BR is2 , |
| 3597 | and |
| 3598 | .BR is3 , |
| 3599 | initialization strings for the terminal, |
| 3600 | .bP |
| 3601 | .BR iprog , |
| 3602 | the path name of a program to be run to initialize the terminal, |
| 3603 | .bP |
| 3604 | and \fBif\fP, the name of a file containing long initialization strings. |
| 3605 | .PP |
| 3606 | These strings are expected to set the terminal into modes consistent |
| 3607 | with the rest of the terminfo description. |
| 3608 | They are normally sent to the terminal, by the |
| 3609 | .I init |
| 3610 | option of the \fB@TPUT@\fP program, each time the user logs in. |
| 3611 | They will be printed in the following order: |
| 3612 | .RS |
| 3613 | .TP |
| 3614 | run the program |
| 3615 | .B iprog |
| 3616 | .TP |
| 3617 | output |
| 3618 | .br |
| 3619 | \fBis1\fP and |
| 3620 | .br |
| 3621 | \fBis2\fP |
| 3622 | .TP |
| 3623 | set the margins using |
| 3624 | \fBmgc\fP or |
| 3625 | .br |
| 3626 | \fBsmglp\fP and \fBsmgrp\fP or |
| 3627 | .br |
| 3628 | \fBsmgl\fP and \fBsmgr\fP |
| 3629 | .TP |
| 3630 | set tabs using |
| 3631 | .B tbc |
| 3632 | and |
| 3633 | .B hts |
| 3634 | .TP |
| 3635 | print the file |
| 3636 | \fBif\fP |
| 3637 | .TP |
| 3638 | and finally output |
| 3639 | \fBis3\fP. |
| 3640 | .RE |
| 3641 | .PP |
| 3642 | Most initialization is done with |
| 3643 | .BR is2 . |
| 3644 | Special terminal modes can be set up without duplicating strings |
| 3645 | by putting the common sequences in |
| 3646 | .B is2 |
| 3647 | and special cases in |
| 3648 | .B is1 |
| 3649 | and |
| 3650 | .BR is3 . |
| 3651 | .PP |
| 3652 | A set of sequences that does a harder reset from a totally unknown state |
| 3653 | can be given as |
| 3654 | .BR rs1 , |
| 3655 | .BR rs2 , |
| 3656 | .B rf |
| 3657 | and |
| 3658 | .BR rs3 , |
| 3659 | analogous to |
| 3660 | .B is1 , |
| 3661 | .B is2 , |
| 3662 | .B if |
| 3663 | and |
| 3664 | .B is3 |
| 3665 | respectively. |
| 3666 | These strings are output |
| 3667 | by \fIreset\fP option of \fB@TPUT@\fP, |
| 3668 | or by the \fB@RESET@\fP program |
| 3669 | (an alias of \fB@TSET@\fP), |
| 3670 | which is used when the terminal gets into a wedged state. |
| 3671 | Commands are normally placed in |
| 3672 | .BR rs1 , |
| 3673 | .B rs2 |
| 3674 | .B rs3 |
| 3675 | and |
| 3676 | .B rf |
| 3677 | only if they produce annoying effects on the screen and are not |
| 3678 | necessary when logging in. |
| 3679 | For example, the command to set the vt100 into 80-column mode would |
| 3680 | normally be part of |
| 3681 | .BR is2 , |
| 3682 | but it causes an annoying glitch of the screen and is not normally |
| 3683 | needed since the terminal is usually already in 80-column mode. |
| 3684 | .PP |
| 3685 | The \fB@RESET@\fP program writes strings including |
| 3686 | .BR iprog , |
| 3687 | etc., in the same order as the |
| 3688 | .I init |
| 3689 | program, using |
| 3690 | .BR rs1 , |
| 3691 | etc., instead of |
| 3692 | .BR is1 , |
| 3693 | etc. |
| 3694 | If any of |
| 3695 | .BR rs1 , |
| 3696 | .BR rs2 , |
| 3697 | .BR rs3 , |
| 3698 | or |
| 3699 | .B rf |
| 3700 | reset capability strings are missing, |
| 3701 | the \fB@RESET@\fP program |
| 3702 | falls back upon the corresponding initialization capability string. |
| 3703 | .PP |
| 3704 | If there are commands to set and clear tab stops, they can be given as |
| 3705 | .B tbc |
| 3706 | (clear all tab stops) |
| 3707 | and |
| 3708 | .B hts |
| 3709 | (set a tab stop in the current column of every row). |
| 3710 | If a more complex sequence is needed to set the tabs than can be |
| 3711 | described by this, the sequence can be placed in |
| 3712 | .B is2 |
| 3713 | or |
| 3714 | .BR if . |
| 3715 | .PP |
| 3716 | The \fB@TPUT@ reset\fP command uses the same capability strings |
| 3717 | as the \fB@RESET@\fP command, |
| 3718 | although the two programs (\fB@TPUT@\fP and \fB@RESET@\fP) |
| 3719 | provide different command-line options. |
| 3720 | .PP |
| 3721 | In practice, these terminfo capabilities are not often used in |
| 3722 | initialization of tabs |
| 3723 | (though they are required for the \fB@TABS@\fP program): |
| 3724 | .bP |
| 3725 | Almost all hardware terminals (at least those which supported tabs) |
| 3726 | initialized those to every \fIeight\fP columns: |
| 3727 | .IP |
| 3728 | The only exception was the AT&T 2300 series, |
| 3729 | which set tabs to every \fIfive\fP columns. |
| 3730 | .bP |
| 3731 | In particular, developers of the hardware terminals which are commonly used |
| 3732 | as models for modern terminal emulators provided documentation demonstrating |
| 3733 | that \fIeight\fP columns were the standard. |
| 3734 | .bP |
| 3735 | Because of this, the terminal initialization programs |
| 3736 | \fB@TPUT@\fP and \fB@TSET@\fP |
| 3737 | use the |
| 3738 | \fBtbc\fP (\fBclear_all_tabs\fP) and |
| 3739 | \fBhts\fP (\fBset_tab\fP) capabilities directly |
| 3740 | only when the \fBit\fP (\fBinit_tabs\fP) capability |
| 3741 | is set to a value other than \fIeight\fP. |
| 3742 | .SS "Delays and Padding" |
| 3743 | Many older and slower terminals do not support either XON/XOFF or DTR |
| 3744 | handshaking, including hard copy terminals and some very archaic CRTs |
| 3745 | (including, for example, DEC VT100s). |
| 3746 | These may require padding characters |
| 3747 | after certain cursor motions and screen changes. |
| 3748 | .PP |
| 3749 | If the terminal uses xon/xoff handshaking for flow control (that is, |
| 3750 | it automatically emits \*^S back to the host when its input buffers are |
| 3751 | close to full), set |
| 3752 | .BR xon . |
| 3753 | This capability suppresses the emission of padding. |
| 3754 | You can also set it |
| 3755 | for memory-mapped console devices effectively that do not have a speed limit. |
| 3756 | Padding information should still be included so that routines can |
| 3757 | make better decisions about relative costs, but actual pad characters will |
| 3758 | not be transmitted. |
| 3759 | .PP |
| 3760 | If \fBpb\fP (padding baud rate) is given, padding is suppressed at baud rates |
| 3761 | below the value of \fBpb\fP. |
| 3762 | If the entry has no padding baud rate, then |
| 3763 | whether padding is emitted or not is completely controlled by \fBxon\fP. |
| 3764 | .PP |
| 3765 | If the terminal requires other than a null (zero) character as a pad, |
| 3766 | then this can be given as \fBpad\fP. |
| 3767 | Only the first character of the |
| 3768 | .B pad |
| 3769 | string is used. |
| 3770 | .SS "Status Lines" |
| 3771 | Some terminals have an extra \*(``status line\*('' which is not normally used by |
| 3772 | software (and thus not counted in the terminal's \fBlines\fP capability). |
| 3773 | .PP |
| 3774 | The simplest case is a status line which is cursor-addressable but not |
| 3775 | part of the main scrolling region on the screen; the Heathkit H19 has |
| 3776 | a status line of this kind, as would a 24-line VT100 with a 23-line |
| 3777 | scrolling region set up on initialization. |
| 3778 | This situation is indicated |
| 3779 | by the \fBhs\fP capability. |
| 3780 | .PP |
| 3781 | Some terminals with status lines need special sequences to access the |
| 3782 | status line. |
| 3783 | These may be expressed as a string with single parameter |
| 3784 | \fBtsl\fP which takes the cursor to a given zero-origin column on the |
| 3785 | status line. |
| 3786 | The capability \fBfsl\fP must return to the main-screen |
| 3787 | cursor positions before the last \fBtsl\fP. |
| 3788 | You may need to embed the |
| 3789 | string values of \fBsc\fP (save cursor) and \fBrc\fP (restore cursor) |
| 3790 | in \fBtsl\fP and \fBfsl\fP to accomplish this. |
| 3791 | .PP |
| 3792 | The status line is normally assumed to be the same width as the width |
| 3793 | of the terminal. |
| 3794 | If this is untrue, you can specify it with the numeric |
| 3795 | capability \fBwsl\fP. |
| 3796 | .PP |
| 3797 | A command to erase or blank the status line may be specified as \fBdsl\fP. |
| 3798 | .PP |
| 3799 | The Boolean capability \fBeslok\fP specifies that escape sequences, tabs, |
| 3800 | etc., work ordinarily in the status line. |
| 3801 | .PP |
| 3802 | The \fI\%ncurses\fP implementation does not yet use any of these |
| 3803 | capabilities. |
| 3804 | They are documented here in case they ever become important. |
| 3805 | .SS "Line Graphics" |
| 3806 | Many terminals have alternate character sets useful for forms-drawing. |
| 3807 | Terminfo and \fBcurses\fP have built-in support |
| 3808 | for most of the drawing characters |
| 3809 | supported by the VT100, with some characters from the AT&T 4410v1 added. |
| 3810 | This alternate character set may be specified by the \fBacsc\fP capability. |
| 3811 | .PP |
| 3812 | .TS |
| 3813 | center; |
| 3814 | Lb Cb S L Lb |
| 3815 | Lb2 Lb2 Lb Lb1 S |
| 3816 | Lb L C Lb Lx. |
| 3817 | \& acsc \& \& |
| 3818 | ACS Name Value Symbol ASCII Fallback / Glyph Name |
| 3819 | _ |
| 3820 | ACS_RARROW 0x2b + > arrow pointing right |
| 3821 | ACS_LARROW 0x2c , < arrow pointing left |
| 3822 | ACS_UARROW 0x2d \- \*^ arrow pointing up |
| 3823 | ACS_DARROW 0x2e . v arrow pointing down |
| 3824 | ACS_BLOCK 0x30 0 # solid square block |
| 3825 | ACS_DIAMOND 0x60 \(ga + diamond |
| 3826 | ACS_CKBOARD 0x61 a : checker board (stipple) |
| 3827 | ACS_DEGREE 0x66 f \e degree symbol |
| 3828 | ACS_PLMINUS 0x67 g # plus/minus |
| 3829 | ACS_BOARD 0x68 h # board of squares |
| 3830 | ACS_LANTERN 0x69 i # lantern symbol |
| 3831 | ACS_LRCORNER 0x6a j + lower right corner |
| 3832 | ACS_URCORNER 0x6b k + upper right corner |
| 3833 | ACS_ULCORNER 0x6c l + upper left corner |
| 3834 | ACS_LLCORNER 0x6d m + lower left corner |
| 3835 | ACS_PLUS 0x6e n + large plus or crossover |
| 3836 | ACS_S1 0x6f o \*~ scan line 1 |
| 3837 | ACS_S3 0x70 p \- scan line 3 |
| 3838 | ACS_HLINE 0x71 q \- horizontal line |
| 3839 | ACS_S7 0x72 r \- scan line 7 |
| 3840 | ACS_S9 0x73 s \&_ scan line 9 |
| 3841 | ACS_LTEE 0x74 t + tee pointing right |
| 3842 | ACS_RTEE 0x75 u + tee pointing left |
| 3843 | ACS_BTEE 0x76 v + tee pointing up |
| 3844 | ACS_TTEE 0x77 w + tee pointing down |
| 3845 | ACS_VLINE 0x78 x | vertical line |
| 3846 | ACS_LEQUAL 0x79 y < less-than-or-equal-to |
| 3847 | ACS_GEQUAL 0x7a z > greater-than-or-equal-to |
| 3848 | ACS_PI 0x7b { * greek pi |
| 3849 | ACS_NEQUAL 0x7c | ! not-equal |
| 3850 | ACS_STERLING 0x7d } f UK pound sign |
| 3851 | ACS_BULLET 0x7e \*~ o bullet |
| 3852 | .TE |
| 3853 | .PP |
| 3854 | A few notes apply to the table itself: |
| 3855 | .bP |
| 3856 | X/Open Curses incorrectly states that the mapping for \fIlantern\fP is |
| 3857 | uppercase \*(``I\*('' although Unix implementations use the |
| 3858 | lowercase \*(``i\*('' mapping. |
| 3859 | .bP |
| 3860 | The DEC VT100 implemented graphics using the alternate character set |
| 3861 | feature, temporarily switching \fImodes\fP and sending characters |
| 3862 | in the range 0x60 (96) to 0x7e (126) |
| 3863 | (the \fBacsc Value\fP column in the table). |
| 3864 | .bP |
| 3865 | The AT&T terminal added graphics characters outside that range. |
| 3866 | .IP |
| 3867 | Some of the characters within the range do not match the VT100; |
| 3868 | presumably they were used in the AT&T terminal: |
| 3869 | \fIboard of squares\fP replaces the VT100 \fInewline\fP symbol, while |
| 3870 | \fIlantern symbol\fP replaces the VT100 \fIvertical tab\fP symbol. |
| 3871 | The other VT100 symbols for control characters (\fIhorizontal tab\fP, |
| 3872 | \fIcarriage return\fP and \fIline-feed\fP) are not (re)used in curses. |
| 3873 | .PP |
| 3874 | The best way to define a new device's graphics set is to add a column |
| 3875 | to a copy of this table for your terminal, giving the character which |
| 3876 | (when emitted between \fBsmacs\fP/\fBrmacs\fP switches) will be rendered |
| 3877 | as the corresponding graphic. |
| 3878 | Then read off the VT100/your terminal |
| 3879 | character pairs right to left in sequence; these become the ACSC string. |
| 3880 | .SS "Color Handling" |
| 3881 | The curses library functions \fBinit_pair\fP and \fBinit_color\fP |
| 3882 | manipulate the \fIcolor pairs\fP and \fIcolor values\fP discussed in this |
| 3883 | section |
| 3884 | (see \fBcurs_color\fP(3X) for details on these and related functions). |
| 3885 | .PP |
| 3886 | Most color terminals are either \*(``Tektronix-like\*('' or \*(``HP-like\*('': |
| 3887 | .bP |
| 3888 | Tektronix-like |
| 3889 | terminals have a predefined set of \fIN\fP colors |
| 3890 | (where \fIN\fP is usually 8), |
| 3891 | and can set |
| 3892 | character-cell foreground and background characters independently, mixing them |
| 3893 | into \fIN\fP\ *\ \fIN\fP color pairs. |
| 3894 | .bP |
| 3895 | On HP-like terminals, the user must set each color |
| 3896 | pair up separately (foreground and background are not independently settable). |
| 3897 | Up to \fIM\fP color pairs may be set up from 2*\fIM\fP different colors. |
| 3898 | ANSI-compatible terminals are Tektronix-like. |
| 3899 | .PP |
| 3900 | Some basic color capabilities are independent of the color method. |
| 3901 | The numeric |
| 3902 | capabilities \fBcolors\fP and \fBpairs\fP specify the maximum numbers of colors |
| 3903 | and color pairs that can be displayed simultaneously. |
| 3904 | The \fBop\fP (original |
| 3905 | pair) string resets foreground and background colors to their default values |
| 3906 | for the terminal. |
| 3907 | The \fBoc\fP string resets all colors or color pairs to |
| 3908 | their default values for the terminal. |
| 3909 | Some terminals (including many PC |
| 3910 | terminal emulators) erase screen areas with the current background color rather |
| 3911 | than the power-up default background; these should have the Boolean capability |
| 3912 | \fBbce\fP. |
| 3913 | .PP |
| 3914 | While the curses library works with \fIcolor pairs\fP |
| 3915 | (reflecting the inability of some devices to set foreground |
| 3916 | and background colors independently), |
| 3917 | there are separate capabilities for setting these features: |
| 3918 | .bP |
| 3919 | To change the current foreground or background color on a Tektronix-type |
| 3920 | terminal, use \fBsetaf\fP (set ANSI foreground) and \fBsetab\fP (set ANSI |
| 3921 | background) or \fBsetf\fP (set foreground) and \fBsetb\fP (set background). |
| 3922 | These take one parameter, the color number. |
| 3923 | The SVr4 documentation describes |
| 3924 | only \fBsetaf\fP/\fBsetab\fP; the XPG4 draft says that "If the terminal |
| 3925 | supports ANSI escape sequences to set background and foreground, they should |
| 3926 | be coded as \fBsetaf\fP and \fBsetab\fP, respectively. |
| 3927 | .bP |
| 3928 | If the terminal |
| 3929 | supports other escape sequences to set background and foreground, they should |
| 3930 | be coded as \fBsetf\fP and \fBsetb\fP, respectively. |
| 3931 | The \fBvidputs\fP and the \fBrefresh\fP(3X) functions |
| 3932 | use the \fBsetaf\fP and \fBsetab\fP capabilities if they are defined. |
| 3933 | .PP |
| 3934 | The \fBsetaf\fP/\fBsetab\fP and \fBsetf\fP/\fBsetb\fP capabilities take a |
| 3935 | single numeric argument each. |
| 3936 | Argument values 0-7 of \fBsetaf\fP/\fBsetab\fP are portably defined as |
| 3937 | follows (the middle column is the symbolic #define available in the header for |
| 3938 | the \fBcurses\fP or \fI\%ncurses\fP libraries). |
| 3939 | The terminal hardware is free to |
| 3940 | map these as it likes, but the RGB values indicate normal locations in color |
| 3941 | space. |
| 3942 | .PP |
| 3943 | .TS |
| 3944 | center; |
| 3945 | cb cb cb cb s s |
| 3946 | l lb c l1 l1 l . |
| 3947 | Color #define Value RGB |
| 3948 | _ |
| 3949 | black COLOR_BLACK 0 0, 0, 0 |
| 3950 | red COLOR_RED 1 max, 0, 0 |
| 3951 | green COLOR_GREEN 2 0, max, 0 |
| 3952 | yellow COLOR_YELLOW 3 max, max, 0 |
| 3953 | blue COLOR_BLUE 4 0, 0, max |
| 3954 | magenta COLOR_MAGENTA 5 max, 0, max |
| 3955 | cyan COLOR_CYAN 6 0, max, max |
| 3956 | white COLOR_WHITE 7 max, max, max |
| 3957 | .TE |
| 3958 | .br |
| 3959 | .if t .ne 6v |
| 3960 | .PP |
| 3961 | The argument values of \fBsetf\fP/\fBsetb\fP historically correspond to |
| 3962 | a different mapping, i.e., |
| 3963 | .PP |
| 3964 | .TS |
| 3965 | center; |
| 3966 | cb cb cb cb s s |
| 3967 | l lb c l1 l1 l . |
| 3968 | Color #define Value RGB |
| 3969 | _ |
| 3970 | black COLOR_BLACK 0 0, 0, 0 |
| 3971 | blue COLOR_BLUE 1 0, 0, max |
| 3972 | green COLOR_GREEN 2 0, max, 0 |
| 3973 | cyan COLOR_CYAN 3 0, max, max |
| 3974 | red COLOR_RED 4 max, 0, 0 |
| 3975 | magenta COLOR_MAGENTA 5 max, 0, max |
| 3976 | yellow COLOR_YELLOW 6 max, max, 0 |
| 3977 | white COLOR_WHITE 7 max, max, max |
| 3978 | .TE |
| 3979 | .PP |
| 3980 | It is important to not confuse the two sets of color capabilities; |
| 3981 | otherwise red/blue will be interchanged on the display. |
| 3982 | .PP |
| 3983 | On an HP-like terminal, use \fBscp\fP with a color pair number parameter to set |
| 3984 | which color pair is current. |
| 3985 | .PP |
| 3986 | Some terminals allow the \fIcolor values\fP to be modified: |
| 3987 | .bP |
| 3988 | On a Tektronix-like terminal, the capability \fBccc\fP may be present to |
| 3989 | indicate that colors can be modified. |
| 3990 | If so, the \fBinitc\fP capability will |
| 3991 | take a color number (0 to \fBcolors\fP \- 1)and three more parameters which |
| 3992 | describe the color. |
| 3993 | These three parameters default to being interpreted as RGB |
| 3994 | (Red, Green, Blue) values. |
| 3995 | If the Boolean capability \fBhls\fP is present, |
| 3996 | they are instead as HLS (Hue, Lightness, Saturation) indices. |
| 3997 | The ranges are |
| 3998 | terminal-dependent. |
| 3999 | .bP |
| 4000 | On an HP-like terminal, \fBinitp\fP may give a capability for changing a |
| 4001 | color pair value. |
| 4002 | It will take seven parameters; a color pair number (0 to |
| 4003 | \fBmax_pairs\fP \- 1), and two triples describing first background and then |
| 4004 | foreground colors. |
| 4005 | These parameters must be (Red, Green, Blue) or |
| 4006 | (Hue, Lightness, Saturation) depending on \fBhls\fP. |
| 4007 | .PP |
| 4008 | On some color terminals, colors collide with highlights. |
| 4009 | You can register |
| 4010 | these collisions with the \fBncv\fP capability. |
| 4011 | This is a bit mask of |
| 4012 | attributes not to be used when colors are enabled. |
| 4013 | The correspondence with the |
| 4014 | attributes understood by \fBcurses\fP is as follows: |
| 4015 | .PP |
| 4016 | .TS |
| 4017 | center; |
| 4018 | cb cb cb cb |
| 4019 | lb n n lb. |
| 4020 | Attribute Bit Decimal Set by |
| 4021 | _ |
| 4022 | A_STANDOUT 0 1 sgr |
| 4023 | A_UNDERLINE 1 2 sgr |
| 4024 | A_REVERSE 2 4 sgr |
| 4025 | A_BLINK 3 8 sgr |
| 4026 | A_DIM 4 16 sgr |
| 4027 | A_BOLD 5 32 sgr |
| 4028 | A_INVIS 6 64 sgr |
| 4029 | A_PROTECT 7 128 sgr |
| 4030 | A_ALTCHARSET 8 256 sgr |
| 4031 | A_HORIZONTAL 9 512 sgr1 |
| 4032 | A_LEFT 10 1024 sgr1 |
| 4033 | A_LOW 11 2048 sgr1 |
| 4034 | A_RIGHT 12 4096 sgr1 |
| 4035 | A_TOP 13 8192 sgr1 |
| 4036 | A_VERTICAL 14 16384 sgr1 |
| 4037 | A_ITALIC 15 32768 sitm |
| 4038 | .TE |
| 4039 | .PP |
| 4040 | For example, on many IBM PC consoles, the underline attribute collides with the |
| 4041 | foreground color blue and is not available in color mode. |
| 4042 | These should have |
| 4043 | an \fBncv\fP capability of 2. |
| 4044 | .PP |
| 4045 | SVr4 curses does nothing with \fBncv\fP, |
| 4046 | \fI\%ncurses\fP recognizes it and optimizes |
| 4047 | the output in favor of colors. |
| 4048 | .SS Miscellaneous |
| 4049 | If the terminal requires other than a null (zero) character as a pad, then this |
| 4050 | can be given as pad. |
| 4051 | Only the first character of the pad string is used. |
| 4052 | If the terminal does not have a pad character, specify npc. |
| 4053 | Note that \fI\%ncurses\fP implements the termcap-compatible \fBPC\fP |
| 4054 | variable; |
| 4055 | though the application may set this value to something other than |
| 4056 | a null, |
| 4057 | \fI\%ncurses\fP will test \fBnpc\fP first and use napms if the terminal |
| 4058 | has no pad character. |
| 4059 | .PP |
| 4060 | If the terminal can move up or down half a line, |
| 4061 | this can be indicated with |
| 4062 | .B hu |
| 4063 | (half-line up) |
| 4064 | and |
| 4065 | .B hd |
| 4066 | (half-line down). |
| 4067 | This is primarily useful for superscripts and subscripts on hard-copy terminals. |
| 4068 | If a hard-copy terminal can eject to the next page (form feed), give this as |
| 4069 | .B ff |
| 4070 | (usually control/L). |
| 4071 | .PP |
| 4072 | If there is a command to repeat a given character a given number of |
| 4073 | times (to save time transmitting a large number of identical characters) |
| 4074 | this can be indicated with the parameterized string |
| 4075 | .BR rep . |
| 4076 | The first parameter is the character to be repeated and the second |
| 4077 | is the number of times to repeat it. |
| 4078 | Thus, tparm(repeat_char, \*'x\*', 10) is the same as \*(``xxxxxxxxxx\*(''. |
| 4079 | .PP |
| 4080 | If the terminal has a settable command character, |
| 4081 | such as the \s-1TEKTRONIX\s+1 4025, |
| 4082 | this can be indicated with |
| 4083 | .BR cmdch . |
| 4084 | A prototype command character is chosen which is used in all capabilities. |
| 4085 | This character is given in the |
| 4086 | .B cmdch |
| 4087 | capability to identify it. |
| 4088 | The following convention is supported on some Unix systems: |
| 4089 | The environment is to be searched for a |
| 4090 | .B CC |
| 4091 | variable, and if found, all |
| 4092 | occurrences of the prototype character are replaced with the character |
| 4093 | in the environment variable. |
| 4094 | .PP |
| 4095 | Terminal descriptions that do not represent a specific kind of known |
| 4096 | terminal, such as |
| 4097 | .IR switch , |
| 4098 | .IR dialup , |
| 4099 | .IR patch , |
| 4100 | and |
| 4101 | .IR network , |
| 4102 | should include the |
| 4103 | .B gn |
| 4104 | (generic) capability so that programs can complain that they do not know |
| 4105 | how to talk to the terminal. |
| 4106 | (This capability does not apply to |
| 4107 | .I virtual |
| 4108 | terminal descriptions for which the escape sequences are known.) |
| 4109 | .PP |
| 4110 | If the terminal has a \*(``meta key\*('' which acts as a shift key, |
| 4111 | setting the 8th bit of any character transmitted, this fact can |
| 4112 | be indicated with |
| 4113 | .BR km . |
| 4114 | Otherwise, software will assume that the 8th bit is parity and it |
| 4115 | will usually be cleared. |
| 4116 | If strings exist to turn this \*(``meta mode\*('' on and off, they |
| 4117 | can be given as |
| 4118 | .B smm |
| 4119 | and |
| 4120 | .BR rmm . |
| 4121 | .PP |
| 4122 | If the terminal has more lines of memory than will fit on the screen |
| 4123 | at once, the number of lines of memory can be indicated with |
| 4124 | .BR lm . |
| 4125 | A value of |
| 4126 | .BR lm #0 |
| 4127 | indicates that the number of lines is not fixed, |
| 4128 | but that there is still more memory than fits on the screen. |
| 4129 | .PP |
| 4130 | If the terminal is one of those supported by the Unix virtual |
| 4131 | terminal protocol, the terminal number can be given as |
| 4132 | .BR vt . |
| 4133 | .PP |
| 4134 | Media copy |
| 4135 | strings which control an auxiliary printer connected to the terminal |
| 4136 | can be given as |
| 4137 | .BR mc0 : |
| 4138 | print the contents of the screen, |
| 4139 | .BR mc4 : |
| 4140 | turn off the printer, and |
| 4141 | .BR mc5 : |
| 4142 | turn on the printer. |
| 4143 | When the printer is on, all text sent to the terminal will be sent |
| 4144 | to the printer. |
| 4145 | It is undefined whether the text is also displayed on the terminal screen |
| 4146 | when the printer is on. |
| 4147 | A variation |
| 4148 | .B mc5p |
| 4149 | takes one parameter, and leaves the printer on for as many characters |
| 4150 | as the value of the parameter, then turns the printer off. |
| 4151 | The parameter should not exceed 255. |
| 4152 | All text, including |
| 4153 | .BR mc4 , |
| 4154 | is transparently passed to the printer while an |
| 4155 | .B mc5p |
| 4156 | is in effect. |
| 4157 | .SS "Glitches and Brain Damage" |
| 4158 | Hazeltine terminals, |
| 4159 | which do not allow \*(``\*~\*('' characters to be displayed should |
| 4160 | indicate \fBhz\fP. |
| 4161 | .PP |
| 4162 | Terminals which ignore a line-feed immediately after an \fBam\fP wrap, |
| 4163 | such as the Concept and vt100, |
| 4164 | should indicate \fBxenl\fP. |
| 4165 | .PP |
| 4166 | If |
| 4167 | .B el |
| 4168 | is required to get rid of standout |
| 4169 | (instead of merely writing normal text on top of it), |
| 4170 | \fBxhp\fP should be given. |
| 4171 | .PP |
| 4172 | Teleray terminals, where tabs turn all characters moved over to blanks, |
| 4173 | should indicate \fBxt\fP (destructive tabs). |
| 4174 | Note: the variable indicating this is now \*(``dest_tabs_magic_smso\*(''; in |
| 4175 | older versions, it was teleray_glitch. |
| 4176 | This glitch is also taken to mean that it is not possible to position |
| 4177 | the cursor on top of a \*(``magic cookie\*('', |
| 4178 | that to erase standout mode it is instead necessary to use |
| 4179 | delete and insert line. |
| 4180 | The \fI\%ncurses\fP implementation ignores this glitch. |
| 4181 | .PP |
| 4182 | The Beehive Superbee, which is unable to correctly transmit the escape |
| 4183 | or control/C characters, has |
| 4184 | .BR xsb , |
| 4185 | indicating that the f1 key is used for escape and f2 for control/C. |
| 4186 | (Only certain Superbees have this problem, depending on the ROM.) |
| 4187 | Note that in older terminfo versions, this capability was called |
| 4188 | \*(``beehive_glitch\*(''; it is now \*(``no_esc_ctl_c\*(''. |
| 4189 | .PP |
| 4190 | Other specific terminal problems may be corrected by adding more |
| 4191 | capabilities of the form \fBx\fIx\fR. |
| 4192 | .SS "Pitfalls of Long Entries" |
| 4193 | Long terminfo entries are unlikely to be a problem; to date, no entry has even |
| 4194 | approached terminfo's 4096-byte string-table maximum. |
| 4195 | Unfortunately, the termcap |
| 4196 | translations are much more strictly limited (to 1023 bytes), |
| 4197 | thus termcap translations of long terminfo entries can cause problems. |
| 4198 | .PP |
| 4199 | The man pages for 4.3BSD |
| 4200 | and older versions of \fBtgetent\fP instruct the user to |
| 4201 | allocate a 1024-byte buffer for the termcap entry. |
| 4202 | The entry gets null-terminated by |
| 4203 | the termcap library, so that makes the maximum safe length for a termcap entry |
| 4204 | 1k\-1 (1023) bytes. |
| 4205 | Depending on what the application and the termcap library being used does, |
| 4206 | and where in the termcap file the terminal type that \fBtgetent\fP |
| 4207 | is searching for is, several bad things can happen: |
| 4208 | .bP |
| 4209 | some termcap libraries print a warning message, |
| 4210 | .bP |
| 4211 | some exit if they find an entry that's longer than 1023 bytes, |
| 4212 | .bP |
| 4213 | some neither exit nor warn, doing nothing useful, and |
| 4214 | .bP |
| 4215 | some simply truncate the entries to 1023 bytes. |
| 4216 | .PP |
| 4217 | Some application programs allocate more than |
| 4218 | the recommended 1K for the termcap entry; others do not. |
| 4219 | .PP |
| 4220 | Each termcap entry has two important sizes associated with it: before |
| 4221 | \*(``tc\*('' expansion, and after \*(``tc\*('' expansion. |
| 4222 | \*(``tc\*('' is the capability that |
| 4223 | tacks on another termcap entry to the end of the current one, to add |
| 4224 | on its capabilities. |
| 4225 | If a termcap entry does not use the \*(``tc\*('' |
| 4226 | capability, then of course the two lengths are the same. |
| 4227 | .PP |
| 4228 | The \*(``before tc expansion\*('' length is the most important one, because it |
| 4229 | affects more than just users of that particular terminal. |
| 4230 | This is the |
| 4231 | length of the entry as it exists in /etc/termcap, minus the |
| 4232 | backslash-newline pairs, which \fBtgetent\fP strips out while reading it. |
| 4233 | Some termcap libraries strip off the final newline, too (GNU termcap does not). |
| 4234 | Now suppose: |
| 4235 | .bP |
| 4236 | a termcap entry before expansion is more than 1023 bytes long, |
| 4237 | .bP |
| 4238 | and the application has only allocated a 1k buffer, |
| 4239 | .bP |
| 4240 | and the termcap library (like the one in BSD/OS 1.1 and GNU) reads |
| 4241 | the whole entry into the buffer, no matter what its length, to see |
| 4242 | if it is the entry it wants, |
| 4243 | .bP |
| 4244 | and \fBtgetent\fP is searching for a terminal type that either is the |
| 4245 | long entry, appears in the termcap file after the long entry, or |
| 4246 | does not appear in the file at all (so that \fBtgetent\fP has to search |
| 4247 | the whole termcap file). |
| 4248 | .PP |
| 4249 | Then \fBtgetent\fP will overwrite memory, |
| 4250 | perhaps its stack, |
| 4251 | and probably core dump the program. |
| 4252 | Programs like telnet are particularly vulnerable; modern telnets |
| 4253 | pass along values like the terminal type automatically. |
| 4254 | The results are almost |
| 4255 | as undesirable with a termcap library, like SunOS 4.1.3 and Ultrix 4.4, that |
| 4256 | prints warning messages when it reads an overly long termcap entry. |
| 4257 | If a |
| 4258 | termcap library truncates long entries, like OSF/1 3.0, it is immune to dying |
| 4259 | here but will return incorrect data for the terminal. |
| 4260 | .PP |
| 4261 | The \*(``after tc expansion\*('' length will have a similar effect to the |
| 4262 | above, but only for people who actually set \fITERM\fP to that terminal |
| 4263 | type, since \fBtgetent\fP only does \*(``tc\*('' expansion once it is found the |
| 4264 | terminal type it was looking for, not while searching. |
| 4265 | .PP |
| 4266 | In summary, a termcap entry that is longer than 1023 bytes can cause, |
| 4267 | on various combinations of termcap libraries and applications, a core |
| 4268 | dump, warnings, or incorrect operation. |
| 4269 | If it is too long even before |
| 4270 | \*(``tc\*('' expansion, it will have this effect even for users of some other |
| 4271 | terminal types and users whose \fITERM\fP variable does not have a termcap |
| 4272 | entry. |
| 4273 | .PP |
| 4274 | When in \-C (translate to termcap) mode, |
| 4275 | the \fI\%ncurses\fP implementation of |
| 4276 | \fB@TIC@\fP(1M) issues warning messages when the pre-tc length of a termcap |
| 4277 | translation is too long. |
| 4278 | The \-c (check) option also checks resolved (after tc |
| 4279 | expansion) lengths. |
| 4280 | .SH FILES |
| 4281 | .TP |
| 4282 | .I \*d |
| 4283 | compiled terminal description database directory |
| 4284 | .SH EXTENSIONS |
| 4285 | Searching for terminal descriptions in |
| 4286 | \fI$HOME/.terminfo\fP and \fI\%TERMINFO_DIRS\fP |
| 4287 | is not supported by older implementations. |
| 4288 | .PP |
| 4289 | Some SVr4 \fBcurses\fP implementations, and all previous to SVr4, do not |
| 4290 | interpret the %A and %O operators in parameter strings. |
| 4291 | .PP |
| 4292 | SVr4/XPG4 do not specify whether \fBmsgr\fP licenses movement while in |
| 4293 | an alternate-character-set mode (such modes may, among other things, map |
| 4294 | CR and NL to characters that do not trigger local motions). |
| 4295 | The \fI\%ncurses\fP implementation ignores \fBmsgr\fP in |
| 4296 | \fBALTCHARSET\fP mode. |
| 4297 | This raises the possibility that an XPG4 |
| 4298 | implementation making the opposite interpretation may need terminfo |
| 4299 | entries made for \fI\%ncurses\fP to have \fBmsgr\fP turned off. |
| 4300 | .PP |
| 4301 | The \fI\%ncurses\fP library handles insert-character and |
| 4302 | insert-character modes in a slightly non-standard way to get better |
| 4303 | update efficiency. |
| 4304 | See |
| 4305 | the \fBInsert/Delete Character\fP subsection above. |
| 4306 | .PP |
| 4307 | The parameter substitutions for \fBset_clock\fP and \fBdisplay_clock\fP are |
| 4308 | not documented in SVr4 or X/Open Curses. |
| 4309 | They are deduced from the |
| 4310 | documentation for the AT&T 505 terminal. |
| 4311 | .PP |
| 4312 | Be careful assigning the \fBkmous\fP capability. |
| 4313 | The \fI\%ncurses\fP library wants to interpret it as \fBKEY_MOUSE\fP, |
| 4314 | for use by terminals and emulators like xterm |
| 4315 | that can return mouse-tracking information in the keyboard-input stream. |
| 4316 | .PP |
| 4317 | X/Open Curses does not mention italics. |
| 4318 | Portable applications must assume that numeric capabilities are |
| 4319 | signed 16-bit values. |
| 4320 | This includes the \fIno_color_video\fP (\fBncv\fP) capability. |
| 4321 | The 32768 mask value used for italics with \fBncv\fP can be confused with |
| 4322 | an absent or cancelled \fBncv\fP. |
| 4323 | If italics should work with colors, |
| 4324 | then the \fBncv\fP value must be specified, even if it is zero. |
| 4325 | .PP |
| 4326 | Different commercial ports of \fI\%terminfo\fP and \fIcurses\fP support |
| 4327 | different subsets of X/Open Curses and |
| 4328 | (in some cases) |
| 4329 | different extensions. |
| 4330 | Here is a summary, |
| 4331 | accurate as of October 1995, |
| 4332 | after which the commercial Unix market contracted and lost diversity. |
| 4333 | .bP |
| 4334 | SVr4, |
| 4335 | Solaris, |
| 4336 | and \fI\%ncurses\fP support all SVr4 capabilities. |
| 4337 | .bP |
| 4338 | IRIX supports the SVr4 set and adds one undocumented extended string |
| 4339 | capability (\fB\%set_pglen\fP). |
| 4340 | .bP |
| 4341 | SVr1 and Ultrix support a restricted subset of \fI\%terminfo\fP |
| 4342 | capabilities. |
| 4343 | The Booleans end with \fB\%xon_xoff\fP; |
| 4344 | the numerics with \fB\%width_status_line\fP; |
| 4345 | and the strings with \fB\%prtr_non\fP. |
| 4346 | .bP |
| 4347 | HP/UX supports the SVr1 subset, |
| 4348 | plus the SVr[234] numerics |
| 4349 | \fB\%num_labels\fP, |
| 4350 | \fB\%label_height\fP, |
| 4351 | \fB\%label_width\fP, |
| 4352 | plus function keys 11 through 63, |
| 4353 | plus |
| 4354 | \fB\%plab_norm\fP, |
| 4355 | \fB\%label_on\fP, |
| 4356 | and |
| 4357 | \fB\%label_off\fP, |
| 4358 | plus a number of incompatible string table extensions. |
| 4359 | .bP |
| 4360 | AIX supports the SVr1 subset, |
| 4361 | plus function keys 11 through 63, |
| 4362 | plus a number of incompatible string table extensions. |
| 4363 | .bP |
| 4364 | OSF/1 supports both the SVr4 set and the AIX extensions. |
| 4365 | .SH PORTABILITY |
| 4366 | Do not count on compiled (binary) \fI\%terminfo\fP entries being |
| 4367 | portable between commercial Unix systems. |
| 4368 | At least two implementations of \fI\%terminfo\fP |
| 4369 | (those of HP-UX and AIX) |
| 4370 | diverged from those of other System V Unices after SVr1, |
| 4371 | adding extension capabilities to the string table that |
| 4372 | (in the binary format) |
| 4373 | collide with subsequent System V and X/Open Curses extensions. |
| 4374 | .SH AUTHORS |
| 4375 | Zeyd M. Ben-Halim, Eric S. Raymond, Thomas E. Dickey. |
| 4376 | Based on \fIpcurses\fP by Pavel Curtis. |
| 4377 | .SH SEE ALSO |
| 4378 | \fB\%@INFOCMP@\fP(1M), |
| 4379 | \fB\%@TABS@\fP(1), |
| 4380 | \fB\%@TIC@\fP(1M), |
| 4381 | \fB\%curses\fP(3X), |
| 4382 | \fB\%curs_color\fP(3X), |
| 4383 | \fB\%curs_terminfo\fP(3X), |
| 4384 | \fB\%curs_variables\fP(3X), |
| 4385 | \fB\%printf\fP(3), |
| 4386 | \fB\%term_variables\fP(3X), |
| 4387 | \fB\%term\fP(5), |
| 4388 | \fB\%user_caps\fP(5) |