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