2 .\" DO NOT EDIT THIS FILE BY HAND!
3 .\" It is generated from terminfo.head, Caps, and terminfo.tail.
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. *
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: *
18 .\" The above copyright notice and this permission notice shall be included *
19 .\" in all copies or substantial portions of the Software. *
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. *
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 *
33 .\"***************************************************************************
35 .\" $Id: terminfo.head,v 1.18 2010/07/31 16:08:48 tom Exp $
36 .TH terminfo 5 "" "" "File Formats"
38 .ds d /usr/share/terminfo
40 terminfo \- terminal capability data base
45 is a data base describing terminals, used by screen-oriented programs such as
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).
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.
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.
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.
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:
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
110 For more on terminal naming conventions, see the \fBterm(7)\fR manual page.
112 .\" Head of terminfo man page ends here
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
118 The \fBvariable\fR is the name by which the programmer (at the terminfo level)
119 accesses the capability.
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.
128 The termcap code is the old
130 capability name (some capabilities are new, and have names which termcap
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
139 Finally, the description field attempts to convey the semantics of the
140 capability. You may find some codes in the description field:
143 indicates that padding may be specified
146 in the description field indicates that the string is passed through tparm with
147 parms as given (#\fIi\fP).
150 indicates that padding may vary in proportion to the number of
154 indicates the \fIi\fP\uth\d parameter.
157 These are the boolean capabilities:
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
170 auto_right_margin am am T{
171 terminal has automatic margins
173 back_color_erase bce ut T{
174 screen erased with background color
177 terminal can re-define existing colors
179 ceol_standout_glitch xhp xs T{
180 standout not erased by overwriting (hp)
182 col_addr_glitch xhpa YA T{
183 only positive motion for hpa/mhpa caps
185 cpi_changes_res cpix YF T{
186 changing character pitch changes resolution
188 cr_cancels_micro_mode crxm YB T{
189 using cr turns off micro mode
191 dest_tabs_magic_smso xt xt T{
192 tabs destructive, magic so char (t1061)
194 eat_newline_glitch xenl xn T{
195 newline ignored after 80 cols (concept)
197 erase_overstrike eo eo T{
198 can erase overstrikes with a blank
200 generic_type gn gn T{
206 hard_cursor chts HC T{
207 cursor is hard to see
209 has_meta_key km km T{
210 Has a meta key (i.e., sets 8th-bit)
212 has_print_wheel daisy YC T{
213 printer needs operator to change character set
215 has_status_line hs hs T{
216 has extra status line
218 hue_lightness_saturation hls hl T{
219 terminal uses only HLS color notation (Tektronix)
221 insert_null_glitch in in T{
222 insert mode distinguishes nulls
224 lpi_changes_res lpix YG T{
225 changing line pitch changes resolution
227 memory_above da da T{
228 display may be retained above the screen
230 memory_below db db T{
231 display may be retained below the screen
233 move_insert_mode mir mi T{
234 safe to move while in insert mode
236 move_standout_mode msgr ms T{
237 safe to move while in standout mode
239 needs_xon_xoff nxon nx T{
240 padding will not work, xon/xoff required
242 no_esc_ctlc xsb xb T{
243 beehive (f1=escape, f2=ctrl C)
245 no_pad_char npc NP T{
246 pad character does not exist
248 non_dest_scroll_region ndscr ND T{
249 scrolling region is non-destructive
251 non_rev_rmcup nrrmc NR T{
252 smcup does not reverse rmcup
255 terminal can overstrike
257 prtr_silent mc5i 5i T{
258 printer will not echo on screen
260 row_addr_glitch xvpa YD T{
261 only positive motion for vpa/mvpa caps
263 semi_auto_right_margin sam YE T{
264 printing in last column causes cr
266 status_line_esc_ok eslok es T{
267 escape can be used on the status line
269 tilde_glitch hz hz T{
270 cannot print ~'s (hazeltine)
272 transparent_underline ul ul T{
273 underline character overstrikes
276 terminal uses xon/xoff handshaking
281 These are the numeric capabilities:
289 \fBVariable Cap- TCap Description\fR
290 \fBNumeric name Code\fR
292 number of columns in a line
295 tabs initially every # spaces
297 label_height lh lh T{
301 columns in each label
304 number of lines on screen or page
306 lines_of_memory lm lm T{
307 lines of memory if > line. 0 means varies
309 magic_cookie_glitch xmc sg T{
310 number of blank characters left by smso or rmso
312 max_attributes ma ma T{
313 maximum combined attributes terminal can handle
315 max_colors colors Co T{
316 maximum number of colors on screen
318 max_pairs pairs pa T{
319 maximum number of color-pairs on the screen
321 maximum_windows wnum MW T{
322 maximum number of defineable windows
324 no_color_video ncv NC T{
325 video attributes that cannot be used with colors
327 num_labels nlab Nl T{
328 number of labels on screen
330 padding_baud_rate pb pb T{
331 lowest baud rate where padding needed
333 virtual_terminal vt vt T{
334 virtual terminal number (CB/unix)
336 width_status_line wsl ws T{
337 number of columns in status line
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
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
357 bit_image_type bitype Yp T{
358 type of bit-image device
360 buffer_capacity bufsz Ya T{
361 numbers of bytes buffered before printing
364 number of buttons on mouse
366 dot_horz_spacing spinh Yc T{
367 spacing of dots horizontally in dots per inch
369 dot_vert_spacing spinv Yb T{
370 spacing of pins vertically in pins per inch
372 max_micro_address maddr Yd T{
373 maximum value in micro_..._address
375 max_micro_jump mjump Ye T{
376 maximum value in parm_..._micro
378 micro_col_size mcs Yf T{
379 character step size when in micro mode
381 micro_line_size mls Yg T{
382 line step size when in micro mode
384 number_of_pins npins Yh T{
385 numbers of pins in print-head
387 output_res_char orc Yi T{
388 horizontal resolution in units per line
390 output_res_horz_inch orhi Yk T{
391 horizontal resolution in units per inch
393 output_res_line orl Yj T{
394 vertical resolution in units per line
396 output_res_vert_inch orvi Yl T{
397 vertical resolution in units per inch
400 print rate in characters per second
402 wide_char_size widcs Yn T{
403 character step size when in double wide mode
408 These are the string capabilities:
416 \fBVariable Cap- TCap Description\fR
417 \fBString name Code\fR
419 graphics charset pairs, based on vt100
425 audible signal (bell) (P)
427 carriage_return cr cr T{
428 carriage return (P*) (P*)
430 change_char_pitch cpi ZA T{
431 Change number of characters per inch to #1
433 change_line_pitch lpi ZB T{
434 Change number of lines per inch to #1
436 change_res_horz chr ZC T{
437 Change horizontal resolution to #1
439 change_res_vert cvr ZD T{
440 Change vertical resolution to #1
442 change_scroll_region csr cs T{
443 change region to line #1 to line #2 (P)
445 char_padding rmp rP T{
446 like ip but when in insert mode
448 clear_all_tabs tbc ct T{
449 clear all tab stops (P)
451 clear_margins mgc MC T{
452 clear right and left soft margins
454 clear_screen clear cl T{
455 clear screen and home cursor (P*)
458 Clear to beginning of line
461 clear to end of line (P)
464 clear to end of screen (P*)
466 column_address hpa ch T{
467 horizontal position #1, absolute (P)
469 command_character cmdch CC T{
470 terminal settable cmd character in prototype !?
472 create_window cwin CW T{
473 define a window #1 from #2,#3 to #4,#5
475 cursor_address cup cm T{
476 move to row #1 columns #2
478 cursor_down cud1 do T{
481 cursor_home home ho T{
482 home cursor (if no cup)
484 cursor_invisible civis vi T{
485 make cursor invisible
487 cursor_left cub1 le T{
490 cursor_mem_address mrcup CM T{
491 memory relative cursor addressing, move to row #1 columns #2
493 cursor_normal cnorm ve T{
494 make cursor appear normal (undo civis/cvvis)
496 cursor_right cuf1 nd T{
497 non-destructive space (move right one space)
499 cursor_to_ll ll ll T{
500 last line, first column (if no cup)
505 cursor_visible cvvis vs T{
506 make cursor very visible
508 define_char defc ZE T{
509 Define a character #1, #2 dots wide, descender #3
511 delete_character dch1 dc T{
512 delete character (P*)
514 delete_line dl1 dl T{
517 dial_phone dial DI T{
520 dis_status_line dsl ds T{
523 display_clock dclk DK T{
526 down_half_line hd hd T{
530 enable alternate char set
532 enter_alt_charset_mode smacs as T{
533 start alternate character set (P)
535 enter_am_mode smam SA T{
536 turn on automatic margins
538 enter_blink_mode blink mb T{
541 enter_bold_mode bold md T{
542 turn on bold (extra bright) mode
544 enter_ca_mode smcup ti T{
545 string to start programs using cup
547 enter_delete_mode smdc dm T{
550 enter_dim_mode dim mh T{
551 turn on half-bright mode
553 enter_doublewide_mode swidm ZF T{
554 Enter double-wide mode
556 enter_draft_quality sdrfq ZG T{
557 Enter draft-quality mode
559 enter_insert_mode smir im T{
562 enter_italics_mode sitm ZH T{
565 enter_leftward_mode slm ZI T{
566 Start leftward carriage motion
568 enter_micro_mode smicm ZJ T{
569 Start micro-motion mode
571 enter_near_letter_quality snlq ZK T{
574 enter_normal_quality snrmq ZL T{
575 Enter normal-quality mode
577 enter_protected_mode prot mp T{
578 turn on protected mode
580 enter_reverse_mode rev mr T{
581 turn on reverse video mode
583 enter_secure_mode invis mk T{
584 turn on blank mode (characters invisible)
586 enter_shadow_mode sshm ZM T{
587 Enter shadow-print mode
589 enter_standout_mode smso so T{
592 enter_subscript_mode ssubm ZN T{
595 enter_superscript_mode ssupm ZO T{
596 Enter superscript mode
598 enter_underline_mode smul us T{
601 enter_upward_mode sum ZP T{
602 Start upward carriage motion
604 enter_xon_mode smxon SX T{
605 turn on xon/xoff handshaking
607 erase_chars ech ec T{
608 erase #1 characters (P)
610 exit_alt_charset_mode rmacs ae T{
611 end alternate character set (P)
613 exit_am_mode rmam RA T{
614 turn off automatic margins
616 exit_attribute_mode sgr0 me T{
617 turn off all attributes
619 exit_ca_mode rmcup te T{
620 strings to end programs using cup
622 exit_delete_mode rmdc ed T{
625 exit_doublewide_mode rwidm ZQ T{
628 exit_insert_mode rmir ei T{
631 exit_italics_mode ritm ZR T{
634 exit_leftward_mode rlm ZS T{
637 exit_micro_mode rmicm ZT T{
638 End micro-motion mode
640 exit_shadow_mode rshm ZU T{
641 End shadow-print mode
643 exit_standout_mode rmso se T{
646 exit_subscript_mode rsubm ZV T{
649 exit_superscript_mode rsupm ZW T{
652 exit_underline_mode rmul ue T{
655 exit_upward_mode rum ZX T{
656 End reverse character motion
658 exit_xon_mode rmxon RX T{
659 turn off xon/xoff handshaking
661 fixed_pause pause PA T{
662 pause for 2-3 seconds
664 flash_hook hook fh T{
667 flash_screen flash vb T{
668 visible bell (may not move cursor)
671 hardcopy terminal page eject (P*)
673 from_status_line fsl fs T{
674 return from status line
676 goto_window wingo WG T{
682 init_1string is1 i1 T{
683 initialization string
685 init_2string is2 is T{
686 initialization string
688 init_3string is3 i3 T{
689 initialization string
692 name of initialization file
694 init_prog iprog iP T{
695 path name of program for initialization
697 initialize_color initc Ic T{
698 initialize color #1 to (#2,#3,#4)
700 initialize_pair initp Ip T{
701 Initialize color pair #1 to fg=(#2,#3,#4), bg=(#5,#6,#7)
703 insert_character ich1 ic T{
706 insert_line il1 al T{
709 insert_padding ip ip T{
710 insert padding after inserted character
716 upper right of keypad
721 key_backspace kbs kb T{
734 lower right of keypad
736 key_cancel kcan @2 T{
743 clear-screen or erase key
748 key_command kcmd @4 T{
754 key_create kcrt @6 T{
770 sent by rmir or smir in insert mode
779 clear-to-end-of-line key
782 clear-to-end-of-screen key
998 lower-left key (home down)
1003 key_message kmsg %3 T{
1018 key_options kopt %7 T{
1024 key_previous kprv %8 T{
1027 key_print kprt %9 T{
1033 key_reference kref &1 T{
1036 key_refresh krfr &2 T{
1039 key_replace krpl &3 T{
1042 key_restart krst &4 T{
1045 key_resume kres &5 T{
1048 key_right kcuf1 kr T{
1057 key_scancel kCAN &0 T{
1060 key_scommand kCMD *1 T{
1063 key_scopy kCPY *2 T{
1066 key_screate kCRT *3 T{
1070 shifted delete-character key
1073 shifted delete-line key
1075 key_select kslt *6 T{
1082 shifted clear-to-end-of-line key
1084 key_sexit kEXT *9 T{
1090 key_sfind kFND *0 T{
1093 key_shelp kHLP #1 T{
1096 key_shome kHOM #2 T{
1100 shifted insert-character key
1102 key_sleft kLFT #4 T{
1103 shifted left-arrow key
1105 key_smessage kMSG %a T{
1108 key_smove kMOV %b T{
1111 key_snext kNXT %c T{
1114 key_soptions kOPT %d T{
1117 key_sprevious kPRV %e T{
1118 shifted previous key
1120 key_sprint kPRT %f T{
1126 key_sredo kRDO %g T{
1129 key_sreplace kRPL %h T{
1132 key_sright kRIT %i T{
1133 shifted right-arrow key
1135 key_srsume kRES %j T{
1138 key_ssave kSAV !1 T{
1141 key_ssuspend kSPD !2 T{
1147 key_sundo kUND !3 T{
1150 key_suspend kspd &7 T{
1159 keypad_local rmkx ke T{
1160 leave 'keyboard_transmit' mode
1162 keypad_xmit smkx ks T{
1163 enter 'keyboard_transmit' mode
1166 label on function key f0 if not f0
1169 label on function key f1 if not f1
1172 label on function key f10 if not f10
1175 label on function key f2 if not f2
1178 label on function key f3 if not f3
1181 label on function key f4 if not f4
1184 label on function key f5 if not f5
1187 label on function key f6 if not f6
1190 label on function key f7 if not f7
1193 label on function key f8 if not f8
1196 label on function key f9 if not f9
1198 label_format fln Lf T{
1201 label_off rmln LF T{
1202 turn off soft labels
1211 turn on meta mode (8th-bit on)
1213 micro_column_address mhpa ZY T{
1214 Like column_address in micro mode
1216 micro_down mcud1 ZZ T{
1217 Like cursor_down in micro mode
1219 micro_left mcub1 Za T{
1220 Like cursor_left in micro mode
1222 micro_right mcuf1 Zb T{
1223 Like cursor_right in micro mode
1225 micro_row_address mvpa Zc T{
1226 Like row_address #1 in micro mode
1228 micro_up mcuu1 Zd T{
1229 Like cursor_up in micro mode
1232 newline (behave like cr followed by lf)
1234 order_of_pins porder Ze T{
1235 Match software bits to print-head pins
1237 orig_colors oc oc T{
1238 Set all color pairs to the original ones
1241 Set default pair to its original value
1244 padding char (instead of null)
1247 delete #1 characters (P*)
1249 parm_delete_line dl DL T{
1250 delete #1 lines (P*)
1252 parm_down_cursor cud DO T{
1255 parm_down_micro mcud Zf T{
1256 Like parm_down_cursor in micro mode
1259 insert #1 characters (P*)
1261 parm_index indn SF T{
1262 scroll forward #1 lines (P)
1264 parm_insert_line il AL T{
1265 insert #1 lines (P*)
1267 parm_left_cursor cub LE T{
1268 move #1 characters to the left (P)
1270 parm_left_micro mcub Zg T{
1271 Like parm_left_cursor in micro mode
1273 parm_right_cursor cuf RI T{
1274 move #1 characters to the right (P*)
1276 parm_right_micro mcuf Zh T{
1277 Like parm_right_cursor in micro mode
1279 parm_rindex rin SR T{
1280 scroll back #1 lines (P)
1282 parm_up_cursor cuu UP T{
1285 parm_up_micro mcuu Zi T{
1286 Like parm_up_cursor in micro mode
1288 pkey_key pfkey pk T{
1289 program function key #1 to type string #2
1291 pkey_local pfloc pl T{
1292 program function key #1 to execute string #2
1295 program function key #1 to transmit string #2
1298 program label #1 to show string #2
1300 print_screen mc0 ps T{
1301 print contents of screen
1304 turn on printer for #1 bytes
1313 select pulse dialing
1315 quick_dial qdial QD T{
1316 dial number #1 without checking
1318 remove_clock rmclk RC T{
1321 repeat_char rep rp T{
1322 repeat char #1 #2 times (P*)
1324 req_for_input rfi RF T{
1325 send next input char (for ptys)
1327 reset_1string rs1 r1 T{
1330 reset_2string rs2 r2 T{
1333 reset_3string rs3 r3 T{
1339 restore_cursor rc rc T{
1340 restore cursor to position of last save_cursor
1342 row_address vpa cv T{
1343 vertical position #1 absolute (P)
1345 save_cursor sc sc T{
1346 save current cursor position (P)
1348 scroll_forward ind sf T{
1351 scroll_reverse ri sr T{
1352 scroll text down (P)
1354 select_char_set scs Zj T{
1355 Select character set, #1
1357 set_attributes sgr sa T{
1358 define video attributes #1-#9 (PG9)
1360 set_background setb Sb T{
1361 Set background color #1
1363 set_bottom_margin smgb Zk T{
1364 Set bottom margin at current line
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
1369 set_clock sclk SC T{
1370 set clock, #1 hrs #2 mins #3 secs
1372 set_color_pair scp sp T{
1373 Set current color pair to #1
1375 set_foreground setf Sf T{
1376 Set foreground color #1
1378 set_left_margin smgl ML T{
1379 set left soft margin at current column. See smgl. (ML is not in BSD termcap).
1381 set_left_margin_parm smglp Zm T{
1382 Set left (right) margin at column #1
1384 set_right_margin smgr MR T{
1385 set right soft margin at current column
1387 set_right_margin_parm smgrp Zn T{
1388 Set right margin at column #1
1391 set a tab in every row, current columns
1393 set_top_margin smgt Zo T{
1394 Set top margin at current line
1396 set_top_margin_parm smgtp Zp T{
1397 Set top (bottom) margin at row #1
1399 set_window wind wi T{
1400 current window is lines #1-#2 cols #3-#4
1402 start_bit_image sbim Zq T{
1403 Start printing bit image graphics
1405 start_char_set_def scsd Zr T{
1406 Start character set definition #1, with #2 characters in the set
1408 stop_bit_image rbim Zs T{
1409 Stop printing bit image graphics
1411 stop_char_set_def rcsd Zt T{
1412 End definition of character set #1
1414 subscript_characters subcs Zu T{
1415 List of subscriptable characters
1417 superscript_characters supcs Zv T{
1418 List of superscriptable characters
1421 tab to next 8-space hardware tab stop
1423 these_cause_cr docr Zw T{
1424 Printing any of these characters causes CR
1426 to_status_line tsl ts T{
1427 move to status line, column #1
1430 select touch tone dialing
1432 underline_char uc uc T{
1433 underline char and move past it
1435 up_half_line hu hu T{
1468 wait_tone wait WA T{
1471 xoff_character xoffc XF T{
1474 xon_character xonc XN T{
1477 zero_motion zerom Zx T{
1478 No motion for subsequent character
1483 The following string capabilities are present in the SVr4.0 term structure,
1484 but were originally not documented in the man page.
1492 \fBVariable Cap- TCap Description\fR
1493 \fBString name Code\fR
1494 alt_scancode_esc scesa S8 T{
1495 Alternate escape for scancode emulation
1497 bit_image_carriage_return bicr Yv T{
1498 Move to beginning of same row
1500 bit_image_newline binel Zz T{
1501 Move to next row of the bit image
1503 bit_image_repeat birep Xy T{
1504 Repeat bit image cell #1 #2 times
1506 char_set_names csnm Zy T{
1507 Produce #1'th item from list of character set names
1509 code_set_init csin ci T{
1510 Init sequence for multiple codesets
1512 color_names colornm Yw T{
1513 Give name for color #1
1515 define_bit_image_region defbi Yx T{
1516 Define rectangualar bit image region
1518 device_type devt dv T{
1519 Indicate language/codeset support
1521 display_pc_char dispc S1 T{
1522 Display PC character #1
1524 end_bit_image_region endbi Yy T{
1525 End a bit-image region
1527 enter_pc_charset_mode smpch S2 T{
1528 Enter PC character display mode
1530 enter_scancode_mode smsc S4 T{
1531 Enter PC scancode mode
1533 exit_pc_charset_mode rmpch S3 T{
1534 Exit PC character display mode
1536 exit_scancode_mode rmsc S5 T{
1537 Exit PC scancode mode
1539 get_mouse getm Gm T{
1540 Curses should get button events, parameter #1 not documented.
1542 key_mouse kmous Km T{
1543 Mouse event has occurred
1545 mouse_info minfo Mi T{
1546 Mouse status information
1548 pc_term_options pctrm S6 T{
1551 pkey_plab pfxl xl T{
1552 Program function key #1 to type string #2 and show string #3
1554 req_mouse_pos reqmp RQ T{
1555 Request mouse position
1557 scancode_escape scesc S7 T{
1558 Escape for scancode emulation
1560 set0_des_seq s0ds s0 T{
1561 Shift to codeset 0 (EUC set 0, ASCII)
1563 set1_des_seq s1ds s1 T{
1566 set2_des_seq s2ds s2 T{
1569 set3_des_seq s3ds s3 T{
1572 set_a_background setab AB T{
1573 Set background color to #1, using ANSI escape
1575 set_a_foreground setaf AF T{
1576 Set foreground color to #1, using ANSI escape
1578 set_color_band setcolor Yz T{
1579 Change to ribbon color #1
1581 set_lr_margin smglr ML T{
1582 Set both left and right margins to #1, #2. (ML is not in BSD termcap).
1584 set_page_length slines YZ T{
1585 Set page length to #1 lines
1587 set_tb_margin smgtb MT T{
1588 Sets both top and bottom margins to #1, #2
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!
1607 \fBVariable Cap- TCap Description\fR
1608 \fBString name Code\fR
1609 enter_horizontal_hl_mode ehhlm Xh T{
1610 Enter horizontal highlight mode
1612 enter_left_hl_mode elhlm Xl T{
1613 Enter left highlight mode
1615 enter_low_hl_mode elohlm Xo T{
1616 Enter low highlight mode
1618 enter_right_hl_mode erhlm Xr T{
1619 Enter right highlight mode
1621 enter_top_hl_mode ethlm Xt T{
1622 Enter top highlight mode
1624 enter_vertical_hl_mode evhlm Xv T{
1625 Enter vertical highlight mode
1627 set_a_attributes sgr1 sA T{
1628 Define second set of video attributes #1-#6
1630 set_pglen_inch slength sL T{
1631 YI Set page length to #1 hundredth of an inch
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.
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.
1650 \s-2ansi|ansi/pc-term compatible with color,
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
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 ``#''.
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.
1686 .SS Types of Capabilities
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).
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 `,'.
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.
1720 Finally, characters may be given as three octal digits after a \fB\e\fR.
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
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.
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
1732 (In the case of insert character, the factor is still the
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.
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.
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
1746 in the example above.
1750 .SS Fetching Compiled Descriptions
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.
1755 that directory is searched.
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.
1767 If neither TERMINFO nor TERMINFO_DIRS is set, the last place tried will be the
1768 system terminfo directory, \fI\*d\fR.
1770 (Neither the \fB$HOME/.terminfo\fR lookups nor TERMINFO_DIRS extensions are
1771 supported under stock System V terminfo/curses.)
1773 .SS Preparing Descriptions
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
1779 and to build up a description gradually, using partial descriptions
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
1787 or bugs in the screen-handling code of the test program.
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.
1796 .SS Basic Capabilities
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,
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
1820 (Normally this will be carriage return, control M.)
1821 If there is a code to produce an audible signal (bell, beep, etc)
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
1828 Similarly, codes to move to the right, up, and down should be
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.
1838 A very important point here is that the local cursor motions encoded
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,
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
1852 To scroll text down, a program goes to the top left corner
1853 of the screen and sends the
1855 (reverse index) string.
1860 are undefined when not on their respective corners of the screen.
1862 Parameterized versions of the scrolling sequences are
1866 which have the same semantics as
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.
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
1877 from the last column.
1878 The only local motion which is defined from the left edge is if
1882 from the left edge will move to the right edge of the previous row.
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,
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
1895 It does not matter if the command clears the remainder of the current line,
1896 so if the terminal has no
1900 it may still be possible to craft a working
1902 out of one or both of them.
1904 These capabilities suffice to describe hard-copy and \*(lqglass-tty\*(rq terminals.
1905 Thus the model 33 teletype is described as
1911 \s-133\||\|tty33\||\|tty\||\|model 33 teletype,
1912 bel=^G, cols#72, cr=^M, cud1=^J, hc, ind=^J, os,\s+1
1916 while the Lear Siegler \s-1ADM-3\s0 is described as
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
1929 .SS Parameterized Strings
1931 Cursor addressing and other strings requiring parameters
1932 in the terminal are described by a
1933 parameterized string capability, with
1935 like escapes \fB%x\fR in it.
1936 For example, to address the cursor, the
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
1946 The parameter mechanism uses a stack and special \fB%\fP codes
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.
1955 The \fB%\fR encodings have the following meanings:
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.
1967 print pop() like %c in \fBprintf\fP
1970 print pop() like %s in \fBprintf\fP
1973 push \fIi\fP'th parameter
1976 set dynamic variable [a\-z] to pop()
1979 get dynamic variable [a\-z] and push it
1982 set static variable [a\-z] to pop()
1985 get static variable [a\-z] and push it
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.
1994 char constant \fIc\fP
1997 integer constant \fInn\fP
2003 arithmetic (%m is mod): push(pop() op pop())
2006 bit operations (AND, OR and exclusive-OR): push(pop() op pop())
2009 logical operations: push(pop() op pop())
2012 logical AND and OR operations (for conditionals)
2015 unary operations (logical and bit complement): push(op pop())
2018 add 1 to first two parameters (for ANSI terminals)
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.
2027 It is possible to form else-if's a la Algol 68:
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 %;
2032 where c\di\u are conditions, b\di\u are bodies.
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
2038 The \fB\-f\fP option splits the string into lines with the parts indented.
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.
2045 Consider the HP2645, which, to get to row 3 and column 12, needs
2046 to be sent \eE&a12c03Y padded for 6 milliseconds.
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.
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.)
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.
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
2086 If the terminal has row or column absolute cursor addressing,
2087 these can be given as single parameter capabilities
2089 (horizontal position absolute)
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
2096 If there are parameterized local motions (e.g., move
2098 spaces to the right) these can be given as
2104 with a single parameter indicating how many spaces to move.
2105 These are primarily useful if the terminal does not have
2107 such as the \s-1TEKTRONIX\s+1 4025.
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
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,
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.
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,
2140 .SS Insert/delete line and vertical motions
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
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.
2153 which take a single parameter and insert or delete that many lines can
2159 If the terminal has a settable scrolling region (like the vt100)
2160 the command to set this can be described with the
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.
2166 It is possible to get the effect of insert or delete line using
2168 on a properly chosen region; the
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(3) library does this synthesis
2175 automatically, so you need not compose insert/delete strings for
2176 an entry with \fBcsr\fR).
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).
2182 Inserting lines at the top or bottom of the screen can also be
2187 on many terminals without a true insert/delete line,
2188 and is often faster even on terminals with those features.
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.
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
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.
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
2209 The four parameters are the starting and ending lines in memory
2210 and the starting and ending columns in memory, in that order.
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.
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.
2219 .SS Insert/Delete Character
2221 There are two basic kinds of intelligent terminals with respect to
2222 insert/delete character which can be described using
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
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.
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.
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
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.
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
2284 can be given, and both will be used.
2287 capability, with one parameter,
2289 will repeat the effects of
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.
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
2303 Omitting \fBmir\fR will affect only speed.
2305 (notably Datamedia's) must not have \fBmir\fR because of the way their
2308 Finally, you can specify
2310 to delete a single character,
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
2324 characters (equivalent to outputting
2326 blanks without moving the cursor)
2331 .SS "Highlighting, Underlining, and Visible Bells"
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.
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.
2355 Other capabilities to enter various highlighting modes include
2359 (bold or extra bright)
2361 (dim or half-bright)
2363 (blanking or invisible text)
2373 (enter alternate character set mode)
2376 (exit alternate character set mode).
2377 Turning on any of these modes singly may or may not turn off other modes.
2379 If there is a sequence to set arbitrary combinations of modes,
2380 this should be given as
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
2388 Not all modes need be supported by
2390 only those for which corresponding separate attribute commands exist.
2392 For example, the DEC vt220 supports most of the modes:
2399 \fBtparm parameter attribute escape sequence\fP
2402 p1 standout \\E[0;1;7m
2403 p2 underline \\E[0;4m
2406 p5 dim not available
2410 p9 altcharset ^O (off) ^N (on)
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.
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.
2427 Writing out the above sequences, along with their dependencies yields
2434 \fBsequence when to output terminfo translation\fP
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%;
2443 ^N or ^O if p9 ^N, else ^O %?%p9%t^N%e^O%;
2446 Putting this all together into the sgr sequence gives:
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%;,
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.
2461 Terminals with the ``magic cookie'' glitch
2463 deposit special ``cookies'' when they receive mode-setting sequences,
2464 which affect the display algorithm rather than having extra bits for
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,
2472 capability, asserting that it is safe to move in standout mode, is present.
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.
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
2483 If there is a way to make the cursor completely invisible, give that as
2487 should be given which undoes the effects of both of these modes.
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.
2498 .SS Keypad and Function Keys
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:
2523 (clear the tab stop in this column),
2525 (clear screen or erase key),
2533 (clear to end of line),
2535 (clear to end of screen),
2537 (insert character or enter insert mode),
2545 (scroll forward/down),
2547 (scroll backward/up),
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
2558 These keys are useful when the effects of a 3 by 3 directional pad are needed.
2560 Strings to program function keys can be given as
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
2572 causes pressing the given key to be the same as the user typing the
2575 causes the string to be executed by the terminal in local; and
2577 causes the string to be transmitted to the computer.
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.
2587 .SS Tabs and Initialization
2589 If the terminal has hardware tabs, the command to advance to the next
2590 tab stop can be given as
2592 (usually control I).
2593 A ``back-tab'' command which moves leftward to the preceding tab stop can
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
2602 even if they are present, since the user may not have the tab stops
2604 If the terminal has hardware tabs which are initially set every
2606 spaces when the terminal is powered up,
2607 the numeric parameter
2609 is given, showing the number of spaces the tabs are set to.
2610 This is normally used by the
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.
2623 initialization strings for the terminal,
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
2633 program, each time the user logs in.
2634 They will be printed in the following order:
2644 set the margins using
2663 Most initialization is done with
2665 Special terminal modes can be set up without duplicating strings
2666 by putting the common sequences in
2668 and special cases in
2673 A set of sequences that does a harder reset from a totally unknown state
2687 These strings are output by the
2689 program, which is used when the terminal gets into a wedged state.
2690 Commands are normally placed in
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
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.
2706 program writes strings
2709 etc., in the same order as the
2722 reset capability strings are missing, the
2724 program falls back upon the corresponding initialization capability string.
2726 If there are commands to set and clear tab stops, they can be given as
2728 (clear all tab stops)
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
2737 .SS Delays and Padding
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.
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
2749 This capability suppresses the emission of padding.
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
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.
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
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).
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.
2778 Some terminals with status lines need special sequences to access the
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
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.
2789 The status line is normally assumed to be the same width as the width
2791 If this is untrue, you can specify it with the numeric
2792 capability \fBwsl\fR.
2794 A command to erase or blank the status line may be specified as \fBdsl\fR.
2796 The boolean capability \fBeslok\fR specifies that escape sequences, tabs,
2797 etc., work ordinarily in the status line.
2799 The \fBncurses\fR implementation does not yet use any of these capabilities.
2800 They are documented here in case they ever become important.
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.
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
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
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.
2860 Most color terminals are either `Tektronix-like' or `HP-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.
2869 terminals are Tektronix-like.
2871 Some basic color capabilities are independent of the color method.
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
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
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.
2894 supports other escape sequences to set background and foreground, they should
2895 be coded as \fBsetf\fR and \fBsetb\fR, respectively.
2897 function and the refresh functions use \fBsetaf\fR and \fBsetab\fR if they are
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
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
2924 The argument values of \fBsetf\fR/\fBsetb\fR historically correspond to
2925 a different mapping, i.e.,
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
2940 It is important to not confuse the two sets of color capabilities;
2941 otherwise red/blue will be interchanged on the display.
2943 On an HP-like terminal, use \fBscp\fR with a color-pair number parameter to set
2944 which color pair is current.
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
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.
2958 On an HP-like terminal, \fBinitp\fR may give a capability for changing a
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
2963 These parameters must be (Red, Green, Blue) or
2964 (Hue, Lightness, Saturation) depending on \fBhls\fR.
2966 On some color terminals, colors collide with highlights.
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:
2978 \fBAttribute Bit Decimal\fR
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.
2993 an \fBncv\fR capability of 2.
2995 SVr4 curses does nothing with \fBncv\fR, ncurses recognizes it and optimizes
2996 the output in favor of colors.
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.
3008 If the terminal can move up or down half a line,
3009 this can be indicated with
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
3018 (usually control L).
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
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'.
3028 If the terminal has a settable command character, such as the \s-1TEKTRONIX\s+1 4025,
3029 this can be indicated with
3031 A prototype command character is chosen which is used in all capabilities.
3032 This character is given in the
3034 capability to identify it.
3035 The following convention is supported on some UNIX systems:
3036 The environment is to be searched for a
3038 variable, and if found, all
3039 occurrences of the prototype character are replaced with the character
3040 in the environment variable.
3042 Terminal descriptions that do not represent a specific kind of known
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
3055 terminal descriptions for which the escape sequences are known.)
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
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
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
3074 indicates that the number of lines is not fixed,
3075 but that there is still more memory than fits on the screen.
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
3082 strings which control an auxiliary printer connected to the terminal
3085 print the contents of the screen,
3087 turn off the printer, and
3089 turn on the printer.
3090 When the printer is on, all text sent to the terminal will be sent
3092 It is undefined whether the text is also displayed on the terminal screen
3093 when the printer is on.
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.
3101 is transparently passed to the printer while an
3105 .SS Glitches and Braindamage
3107 Hazeltine terminals, which do not allow `~' characters to be displayed should
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.
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.
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.
3130 The Beehive Superbee, which is unable to correctly transmit the escape
3131 or control C characters, has
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'.
3138 Other specific terminal problems may be corrected by adding more
3139 capabilities of the form \fBx\fR\fIx\fR.
3141 .SS Similar Terminals
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.
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
3150 override those in the base type named by
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.
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
3162 2621\-nl, smkx@, rmkx@, use=2621,
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
3169 .SS Pitfalls of Long Entries
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.
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
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.
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.
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.
3200 The "before tc expansion" length is the most important one, because it
3201 affects more than just users of that particular terminal.
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).
3209 a termcap entry before expansion is more than 1023 bytes long,
3212 and the application has only allocated a 1k buffer,
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,
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).
3225 Then \fBtgetent()\fP will overwrite memory, perhaps its stack, and probably core dump
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.
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.
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.
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
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
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.
3262 Some SVr4 \fBcurses\fR implementations, and all previous to SVr4, do not
3263 interpret the %A and %O operators in parameter strings.
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
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.
3274 The \fBncurses\fR library handles insert-character and insert-character modes
3275 in a slightly non-standard way to get better update efficiency.
3277 the \fBInsert/Delete Character\fR subsection above.
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.
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.
3289 Different commercial ports of terminfo and curses support different subsets of
3290 the XSI Curses standard and (in some cases) different extension sets.
3292 is a summary, accurate as of October 1995:
3294 \fBSVR4, Solaris, ncurses\fR \-\-
3295 These support all SVr4 capabilities.
3298 Supports the SVr4 set, adds one undocumented extended string
3299 capability (\fBset_pglen\fR).
3301 \fBSVr1, Ultrix\fR \-\-
3302 These support a restricted subset of terminfo capabilities.
3304 end with \fBxon_xoff\fR; the numerics with \fBwidth_status_line\fR; and the
3305 strings with \fBprtr_non\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.
3314 Supports the SVr1 subset, plus function keys 11 through 63, plus a number
3315 of incompatible string table extensions.
3318 Supports both the SVr4 set and the AIX extensions.
3322 files containing terminal descriptions
3329 \fBterm_variables\fR(3).
3331 Zeyd M. Ben-Halim, Eric S. Raymond, Thomas E. Dickey.
3332 Based on pcurses by Pavel Curtis.