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-2000,2002 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.10 2002/08/17 23:37:10 tom Exp $
36 .\" $DragonFly: src/lib/libncurses/man/terminfo.5,v 1.1 2005/03/12 19:13:54 eirikn Exp $
37 .TH TERMINFO 5 "" "" "File Formats"
39 .ds d /usr/share/terminfo
41 terminfo \- terminal capability data base
46 is a data base describing terminals, used by screen-oriented programs such as
52 describes terminals by giving a set of capabilities which they
53 have, by specifying how to perform screen operations, and by
54 specifying padding requirements and initialization sequences.
58 consist of a sequence of `,' separated fields (embedded commas may be
59 escaped with a backslash or notated as \e054).
60 White space after the `,' separator is ignored.
61 The first entry for each terminal gives the names which are known for the
62 terminal, separated by `|' characters.
63 The first name given is the most common abbreviation for the terminal,
64 the last name given should be a long name fully identifying the terminal,
65 and all others are understood as synonyms for the terminal name.
66 All names but the last should be in lower case and contain no blanks;
67 the last name may well contain upper case and blanks for readability.
69 Terminal names (except for the last, verbose entry) should
70 be chosen using the following conventions.
71 The particular piece of hardware making up the terminal should
72 have a root name, thus ``hp2621''.
73 This name should not contain hyphens.
74 Modes that the hardware can be in, or user preferences, should
75 be indicated by appending a hyphen and a mode suffix.
76 Thus, a vt100 in 132 column mode would be vt100-w.
77 The following suffixes should be used where possible:
83 \fBSuffix Meaning Example\fP
84 -\fInn\fP Number of lines on the screen aaa-60
85 -\fIn\fPp Number of pages of memory c100-4p
86 -am With automargins (usually the default) vt100-am
87 -m Mono mode; suppress color ansi-m
88 -mc Magic cookie; spaces when highlighting wy30-mc
89 -na No arrow keys (leave them in local) c100-na
90 -nam Without automatic margins vt100-nam
91 -nl No status line att4415-nl
92 -ns No status line hp2626-ns
93 -rv Reverse video c100-rv
94 -s Enable status line vt100-s
95 -vb Use visible bell instead of beep wy370-vb
96 -w Wide mode (> 80 columns, usually 132) vt100-w
99 For more on terminal naming conventions, see the \fBterm(7)\fR manual page.
101 .\" Head of terminfo man page ends here
103 The following is a complete table of the capabilities included in a
104 terminfo description block and available to terminfo-using code. In each
107 The \fBvariable\fR is the name by which the programmer (at the terminfo level)
108 accesses the capability.
110 The \fBcapname\fR is the short name used in the text of the database,
111 and is used by a person updating the database.
112 Whenever possible, capnames are chosen to be the same as or similar to
113 the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
114 identical or very similar names). Semantics are also intended to match
115 those of the specification.
117 The termcap code is the old
119 capability name (some capabilities are new, and have names which termcap
122 Capability names have no hard length limit, but an informal limit of 5
123 characters has been adopted to keep them short and to allow the tabs in
128 Finally, the description field attempts to convey the semantics of the
129 capability. You may find some codes in the description field:
132 indicates that padding may be specified
135 in the description field indicates that the string is passed through tparm with
136 parms as given (#\fIi\fP).
139 indicates that padding may vary in proportion to the number of
143 indicates the \fIi\fP\uth\d parameter.
146 These are the boolean capabilities:
154 \fBVariable Cap- TCap Description\fR
155 \fBBooleans name Code\fR
156 auto_left_margin bw bw T{
157 cub1 wraps from column 0 to last column
159 auto_right_margin am am T{
160 terminal has automatic margins
162 back_color_erase bce ut T{
163 screen erased with background color
166 terminal can re-define existing colors
168 ceol_standout_glitch xhp xs T{
169 standout not erased by overwriting (hp)
171 col_addr_glitch xhpa YA T{
172 only positive motion for hpa/mhpa caps
174 cpi_changes_res cpix YF T{
175 changing character pitch changes resolution
177 cr_cancels_micro_mode crxm YB T{
178 using cr turns off micro mode
180 dest_tabs_magic_smso xt xt T{
181 tabs destructive, magic so char (t1061)
183 eat_newline_glitch xenl xn T{
184 newline ignored after 80 cols (concept)
186 erase_overstrike eo eo T{
187 can erase overstrikes with a blank
189 generic_type gn gn T{
195 hard_cursor chts HC T{
196 cursor is hard to see
198 has_meta_key km km T{
199 Has a meta key (i.e., sets 8th-bit)
201 has_print_wheel daisy YC T{
202 printer needs operator to change character set
204 has_status_line hs hs T{
205 has extra status line
207 hue_lightness_saturation hls hl T{
208 terminal uses only HLS color notation (Tektronix)
210 insert_null_glitch in in T{
211 insert mode distinguishes nulls
213 lpi_changes_res lpix YG T{
214 changing line pitch changes resolution
216 memory_above da da T{
217 display may be retained above the screen
219 memory_below db db T{
220 display may be retained below the screen
222 move_insert_mode mir mi T{
223 safe to move while in insert mode
225 move_standout_mode msgr ms T{
226 safe to move while in standout mode
228 needs_xon_xoff nxon nx T{
229 padding will not work, xon/xoff required
231 no_esc_ctlc xsb xb T{
232 beehive (f1=escape, f2=ctrl C)
234 no_pad_char npc NP T{
235 pad character does not exist
237 non_dest_scroll_region ndscr ND T{
238 scrolling region is non-destructive
240 non_rev_rmcup nrrmc NR T{
241 smcup does not reverse rmcup
244 terminal can overstrike
246 prtr_silent mc5i 5i T{
247 printer will not echo on screen
249 row_addr_glitch xvpa YD T{
250 only positive motion for vpa/mvpa caps
252 semi_auto_right_margin sam YE T{
253 printing in last column causes cr
255 status_line_esc_ok eslok es T{
256 escape can be used on the status line
258 tilde_glitch hz hz T{
259 cannot print ~'s (hazeltine)
261 transparent_underline ul ul T{
262 underline character overstrikes
265 terminal uses xon/xoff handshaking
270 These are the numeric capabilities:
278 \fBVariable Cap- TCap Description\fR
279 \fBNumeric name Code\fR
281 number of columns in a line
284 tabs initially every # spaces
286 label_height lh lh T{
290 columns in each label
293 number of lines on screen or page
295 lines_of_memory lm lm T{
296 lines of memory if > line. 0 means varies
298 magic_cookie_glitch xmc sg T{
299 number of blank characters left by smso or rmso
301 max_attributes ma ma T{
302 maximum combined attributes terminal can handle
304 max_colors colors Co T{
305 maximum number of colors on screen
307 max_pairs pairs pa T{
308 maximum number of color-pairs on the screen
310 maximum_windows wnum MW T{
311 maximum number of defineable windows
313 no_color_video ncv NC T{
314 video attributes that cannot be used with colors
316 num_labels nlab Nl T{
317 number of labels on screen
319 padding_baud_rate pb pb T{
320 lowest baud rate where padding needed
322 virtual_terminal vt vt T{
323 virtual terminal number (CB/unix)
325 width_status_line wsl ws T{
326 number of columns in status line
331 The following numeric capabilities are present in the SVr4.0 term structure,
332 but are not yet documented in the man page. They came in with SVr4's
341 \fBVariable Cap- TCap Description\fR
342 \fBNumeric name Code\fR
343 bit_image_entwining bitwin Yo T{
344 number of passes for each bit-image row
346 bit_image_type bitype Yp T{
347 type of bit-image device
349 buffer_capacity bufsz Ya T{
350 numbers of bytes buffered before printing
353 number of buttons on mouse
355 dot_horz_spacing spinh Yc T{
356 spacing of dots horizontally in dots per inch
358 dot_vert_spacing spinv Yb T{
359 spacing of pins vertically in pins per inch
361 max_micro_address maddr Yd T{
362 maximum value in micro_..._address
364 max_micro_jump mjump Ye T{
365 maximum value in parm_..._micro
367 micro_col_size mcs Yf T{
368 character step size when in micro mode
370 micro_line_size mls Yg T{
371 line step size when in micro mode
373 number_of_pins npins Yh T{
374 numbers of pins in print-head
376 output_res_char orc Yi T{
377 horizontal resolution in units per line
379 output_res_horz_inch orhi Yk T{
380 horizontal resolution in units per inch
382 output_res_line orl Yj T{
383 vertical resolution in units per line
385 output_res_vert_inch orvi Yl T{
386 vertical resolution in units per inch
389 print rate in characters per second
391 wide_char_size widcs Yn T{
392 character step size when in double wide mode
397 These are the string capabilities:
405 \fBVariable Cap- TCap Description\fR
406 \fBString name Code\fR
408 graphics charset pairs, based on vt100
414 audible signal (bell) (P)
416 carriage_return cr cr T{
417 carriage return (P*) (P*)
419 change_char_pitch cpi ZA T{
420 Change number of characters per inch to #1
422 change_line_pitch lpi ZB T{
423 Change number of lines per inch to #1
425 change_res_horz chr ZC T{
426 Change horizontal resolution to #1
428 change_res_vert cvr ZD T{
429 Change vertical resolution to #1
431 change_scroll_region csr cs T{
432 change region to line #1 to line #2 (P)
434 char_padding rmp rP T{
435 like ip but when in insert mode
437 clear_all_tabs tbc ct T{
438 clear all tab stops (P)
440 clear_margins mgc MC T{
441 clear right and left soft margins
443 clear_screen clear cl T{
444 clear screen and home cursor (P*)
447 Clear to beginning of line
450 clear to end of line (P)
453 clear to end of screen (P*)
455 column_address hpa ch T{
456 horizontal position #1, absolute (P)
458 command_character cmdch CC T{
459 terminal settable cmd character in prototype !?
461 create_window cwin CW T{
462 define a window #1 from #2,#3 to #4,#5
464 cursor_address cup cm T{
465 move to row #1 columns #2
467 cursor_down cud1 do T{
470 cursor_home home ho T{
471 home cursor (if no cup)
473 cursor_invisible civis vi T{
474 make cursor invisible
476 cursor_left cub1 le T{
479 cursor_mem_address mrcup CM T{
480 memory relative cursor addressing, move to row #1 columns #2
482 cursor_normal cnorm ve T{
483 make cursor appear normal (undo civis/cvvis)
485 cursor_right cuf1 nd T{
486 non-destructive space (move right one space)
488 cursor_to_ll ll ll T{
489 last line, first column (if no cup)
494 cursor_visible cvvis vs T{
495 make cursor very visible
497 define_char defc ZE T{
498 Define a character #1, #2 dots wide, descender #3
500 delete_character dch1 dc T{
501 delete character (P*)
503 delete_line dl1 dl T{
506 dial_phone dial DI T{
509 dis_status_line dsl ds T{
512 display_clock dclk DK T{
515 down_half_line hd hd T{
519 enable alternate char set
521 enter_alt_charset_mode smacs as T{
522 start alternate character set (P)
524 enter_am_mode smam SA T{
525 turn on automatic margins
527 enter_blink_mode blink mb T{
530 enter_bold_mode bold md T{
531 turn on bold (extra bright) mode
533 enter_ca_mode smcup ti T{
534 string to start programs using cup
536 enter_delete_mode smdc dm T{
539 enter_dim_mode dim mh T{
540 turn on half-bright mode
542 enter_doublewide_mode swidm ZF T{
543 Enter double-wide mode
545 enter_draft_quality sdrfq ZG T{
546 Enter draft-quality mode
548 enter_insert_mode smir im T{
551 enter_italics_mode sitm ZH T{
554 enter_leftward_mode slm ZI T{
555 Start leftward carriage motion
557 enter_micro_mode smicm ZJ T{
558 Start micro-motion mode
560 enter_near_letter_quality snlq ZK T{
563 enter_normal_quality snrmq ZL T{
564 Enter normal-quality mode
566 enter_protected_mode prot mp T{
567 turn on protected mode
569 enter_reverse_mode rev mr T{
570 turn on reverse video mode
572 enter_secure_mode invis mk T{
573 turn on blank mode (characters invisible)
575 enter_shadow_mode sshm ZM T{
576 Enter shadow-print mode
578 enter_standout_mode smso so T{
581 enter_subscript_mode ssubm ZN T{
584 enter_superscript_mode ssupm ZO T{
585 Enter superscript mode
587 enter_underline_mode smul us T{
590 enter_upward_mode sum ZP T{
591 Start upward carriage motion
593 enter_xon_mode smxon SX T{
594 turn on xon/xoff handshaking
596 erase_chars ech ec T{
597 erase #1 characters (P)
599 exit_alt_charset_mode rmacs ae T{
600 end alternate character set (P)
602 exit_am_mode rmam RA T{
603 turn off automatic margins
605 exit_attribute_mode sgr0 me T{
606 turn off all attributes
608 exit_ca_mode rmcup te T{
609 strings to end programs using cup
611 exit_delete_mode rmdc ed T{
614 exit_doublewide_mode rwidm ZQ T{
617 exit_insert_mode rmir ei T{
620 exit_italics_mode ritm ZR T{
623 exit_leftward_mode rlm ZS T{
626 exit_micro_mode rmicm ZT T{
627 End micro-motion mode
629 exit_shadow_mode rshm ZU T{
630 End shadow-print mode
632 exit_standout_mode rmso se T{
635 exit_subscript_mode rsubm ZV T{
638 exit_superscript_mode rsupm ZW T{
641 exit_underline_mode rmul ue T{
644 exit_upward_mode rum ZX T{
645 End reverse character motion
647 exit_xon_mode rmxon RX T{
648 turn off xon/xoff handshaking
650 fixed_pause pause PA T{
651 pause for 2-3 seconds
653 flash_hook hook fh T{
656 flash_screen flash vb T{
657 visible bell (may not move cursor)
660 hardcopy terminal page eject (P*)
662 from_status_line fsl fs T{
663 return from status line
665 goto_window wingo WG T{
671 init_1string is1 i1 T{
672 initialization string
674 init_2string is2 is T{
675 initialization string
677 init_3string is3 i3 T{
678 initialization string
681 name of initialization file
683 init_prog iprog iP T{
684 path name of program for initialization
686 initialize_color initc Ic T{
687 initialize color #1 to (#2,#3,#4)
689 initialize_pair initp Ip T{
690 Initialize color pair #1 to fg=(#2,#3,#4), bg=(#5,#6,#7)
692 insert_character ich1 ic T{
695 insert_line il1 al T{
698 insert_padding ip ip T{
699 insert padding after inserted character
705 upper right of keypad
710 key_backspace kbs kb T{
723 lower right of keypad
725 key_cancel kcan @2 T{
732 clear-screen or erase key
737 key_command kcmd @4 T{
743 key_create kcrt @6 T{
759 sent by rmir or smir in insert mode
768 clear-to-end-of-line key
771 clear-to-end-of-screen key
987 lower-left key (home down)
992 key_message kmsg %3 T{
1007 key_options kopt %7 T{
1013 key_previous kprv %8 T{
1016 key_print kprt %9 T{
1022 key_reference kref &1 T{
1025 key_refresh krfr &2 T{
1028 key_replace krpl &3 T{
1031 key_restart krst &4 T{
1034 key_resume kres &5 T{
1037 key_right kcuf1 kr T{
1046 key_scancel kCAN &0 T{
1049 key_scommand kCMD *1 T{
1052 key_scopy kCPY *2 T{
1055 key_screate kCRT *3 T{
1059 shifted delete-character key
1062 shifted delete-line key
1064 key_select kslt *6 T{
1071 shifted clear-to-end-of-line key
1073 key_sexit kEXT *9 T{
1079 key_sfind kFND *0 T{
1082 key_shelp kHLP #1 T{
1085 key_shome kHOM #2 T{
1089 shifted insert-character key
1091 key_sleft kLFT #4 T{
1092 shifted left-arrow key
1094 key_smessage kMSG %a T{
1097 key_smove kMOV %b T{
1100 key_snext kNXT %c T{
1103 key_soptions kOPT %d T{
1106 key_sprevious kPRV %e T{
1107 shifted previous key
1109 key_sprint kPRT %f T{
1115 key_sredo kRDO %g T{
1118 key_sreplace kRPL %h T{
1121 key_sright kRIT %i T{
1122 shifted right-arrow key
1124 key_srsume kRES %j T{
1127 key_ssave kSAV !1 T{
1130 key_ssuspend kSPD !2 T{
1136 key_sundo kUND !3 T{
1139 key_suspend kspd &7 T{
1148 keypad_local rmkx ke T{
1149 leave 'keyboard_transmit' mode
1151 keypad_xmit smkx ks T{
1152 enter 'keyboard_transmit' mode
1155 label on function key f0 if not f0
1158 label on function key f1 if not f1
1161 label on function key f10 if not f10
1164 label on function key f2 if not f2
1167 label on function key f3 if not f3
1170 label on function key f4 if not f4
1173 label on function key f5 if not f5
1176 label on function key f6 if not f6
1179 label on function key f7 if not f7
1182 label on function key f8 if not f8
1185 label on function key f9 if not f9
1187 label_format fln Lf T{
1190 label_off rmln LF T{
1191 turn off soft labels
1200 turn on meta mode (8th-bit on)
1202 micro_column_address mhpa ZY T{
1203 Like column_address in micro mode
1205 micro_down mcud1 ZZ T{
1206 Like cursor_down in micro mode
1208 micro_left mcub1 Za T{
1209 Like cursor_left in micro mode
1211 micro_right mcuf1 Zb T{
1212 Like cursor_right in micro mode
1214 micro_row_address mvpa Zc T{
1215 Like row_address #1 in micro mode
1217 micro_up mcuu1 Zd T{
1218 Like cursor_up in micro mode
1221 newline (behave like cr followed by lf)
1223 order_of_pins porder Ze T{
1224 Match software bits to print-head pins
1226 orig_colors oc oc T{
1227 Set all color pairs to the original ones
1230 Set default pair to its original value
1233 padding char (instead of null)
1236 delete #1 characters (P*)
1238 parm_delete_line dl DL T{
1239 delete #1 lines (P*)
1241 parm_down_cursor cud DO T{
1244 parm_down_micro mcud Zf T{
1245 Like parm_down_cursor in micro mode
1248 insert #1 characters (P*)
1250 parm_index indn SF T{
1251 scroll forward #1 lines (P)
1253 parm_insert_line il AL T{
1254 insert #1 lines (P*)
1256 parm_left_cursor cub LE T{
1257 move #1 characters to the left (P)
1259 parm_left_micro mcub Zg T{
1260 Like parm_left_cursor in micro mode
1262 parm_right_cursor cuf RI T{
1263 move #1 characters to the right (P*)
1265 parm_right_micro mcuf Zh T{
1266 Like parm_right_cursor in micro mode
1268 parm_rindex rin SR T{
1269 scroll back #1 lines (P)
1271 parm_up_cursor cuu UP T{
1274 parm_up_micro mcuu Zi T{
1275 Like parm_up_cursor in micro mode
1277 pkey_key pfkey pk T{
1278 program function key #1 to type string #2
1280 pkey_local pfloc pl T{
1281 program function key #1 to execute string #2
1284 program function key #1 to transmit string #2
1287 program label #1 to show string #2
1289 print_screen mc0 ps T{
1290 print contents of screen
1293 turn on printer for #1 bytes
1302 select pulse dialing
1304 quick_dial qdial QD T{
1305 dial number #1 without checking
1307 remove_clock rmclk RC T{
1310 repeat_char rep rp T{
1311 repeat char #1 #2 times (P*)
1313 req_for_input rfi RF T{
1314 send next input char (for ptys)
1316 reset_1string rs1 r1 T{
1319 reset_2string rs2 r2 T{
1322 reset_3string rs3 r3 T{
1328 restore_cursor rc rc T{
1329 restore cursor to position of last save_cursor
1331 row_address vpa cv T{
1332 vertical position #1 absolute (P)
1334 save_cursor sc sc T{
1335 save current cursor position (P)
1337 scroll_forward ind sf T{
1340 scroll_reverse ri sr T{
1341 scroll text down (P)
1343 select_char_set scs Zj T{
1344 Select character set, #1
1346 set_attributes sgr sa T{
1347 define video attributes #1-#9 (PG9)
1349 set_background setb Sb T{
1350 Set background color #1
1352 set_bottom_margin smgb Zk T{
1353 Set bottom margin at current line
1355 set_bottom_margin_parm smgbp Zl T{
1356 Set bottom margin at line #1 or (if smgtp is not given) #2 lines from bottom
1358 set_clock sclk SC T{
1359 set clock, #1 hrs #2 mins #3 secs
1361 set_color_pair scp sp T{
1362 Set current color pair to #1
1364 set_foreground setf Sf T{
1365 Set foreground color #1
1367 set_left_margin smgl ML T{
1368 set left soft margin at current column. See smgl. (ML is not in BSD termcap).
1370 set_left_margin_parm smglp Zm T{
1371 Set left (right) margin at column #1
1373 set_right_margin smgr MR T{
1374 set right soft margin at current column
1376 set_right_margin_parm smgrp Zn T{
1377 Set right margin at column #1
1380 set a tab in every row, current columns
1382 set_top_margin smgt Zo T{
1383 Set top margin at current line
1385 set_top_margin_parm smgtp Zp T{
1386 Set top (bottom) margin at row #1
1388 set_window wind wi T{
1389 current window is lines #1-#2 cols #3-#4
1391 start_bit_image sbim Zq T{
1392 Start printing bit image graphics
1394 start_char_set_def scsd Zr T{
1395 Start character set definition #1, with #2 characters in the set
1397 stop_bit_image rbim Zs T{
1398 Stop printing bit image graphics
1400 stop_char_set_def rcsd Zt T{
1401 End definition of character set #1
1403 subscript_characters subcs Zu T{
1404 List of subscriptable characters
1406 superscript_characters supcs Zv T{
1407 List of superscriptable characters
1410 tab to next 8-space hardware tab stop
1412 these_cause_cr docr Zw T{
1413 Printing any of these characters causes CR
1415 to_status_line tsl ts T{
1416 move to status line, column #1
1419 select touch tone dialing
1421 underline_char uc uc T{
1422 underline char and move past it
1424 up_half_line hu hu T{
1457 wait_tone wait WA T{
1460 xoff_character xoffc XF T{
1463 xon_character xonc XN T{
1466 zero_motion zerom Zx T{
1467 No motion for subsequent character
1472 The following string capabilities are present in the SVr4.0 term structure,
1473 but were originally not documented in the man page.
1481 \fBVariable Cap- TCap Description\fR
1482 \fBString name Code\fR
1483 alt_scancode_esc scesa S8 T{
1484 Alternate escape for scancode emulation
1486 bit_image_carriage_return bicr Yv T{
1487 Move to beginning of same row
1489 bit_image_newline binel Zz T{
1490 Move to next row of the bit image
1492 bit_image_repeat birep Xy T{
1493 Repeat bit image cell #1 #2 times
1495 char_set_names csnm Zy T{
1496 Produce #1'th item from list of character set names
1498 code_set_init csin ci T{
1499 Init sequence for multiple codesets
1501 color_names colornm Yw T{
1502 Give name for color #1
1504 define_bit_image_region defbi Yx T{
1505 Define rectangualar bit image region
1507 device_type devt dv T{
1508 Indicate language/codeset support
1510 display_pc_char dispc S1 T{
1511 Display PC character #1
1513 end_bit_image_region endbi Yy T{
1514 End a bit-image region
1516 enter_pc_charset_mode smpch S2 T{
1517 Enter PC character display mode
1519 enter_scancode_mode smsc S4 T{
1520 Enter PC scancode mode
1522 exit_pc_charset_mode rmpch S3 T{
1523 Exit PC character display mode
1525 exit_scancode_mode rmsc S5 T{
1526 Exit PC scancode mode
1528 get_mouse getm Gm T{
1529 Curses should get button events, parameter #1 not documented.
1531 key_mouse kmous Km T{
1532 Mouse event has occurred
1534 mouse_info minfo Mi T{
1535 Mouse status information
1537 pc_term_options pctrm S6 T{
1540 pkey_plab pfxl xl T{
1541 Program function key #1 to type string #2 and show string #3
1543 req_mouse_pos reqmp RQ T{
1544 Request mouse position
1546 scancode_escape scesc S7 T{
1547 Escape for scancode emulation
1549 set0_des_seq s0ds s0 T{
1550 Shift to codeset 0 (EUC set 0, ASCII)
1552 set1_des_seq s1ds s1 T{
1555 set2_des_seq s2ds s2 T{
1558 set3_des_seq s3ds s3 T{
1561 set_a_background setab AB T{
1562 Set background color to #1, using ANSI escape
1564 set_a_foreground setaf AF T{
1565 Set foreground color to #1, using ANSI escape
1567 set_color_band setcolor Yz T{
1568 Change to ribbon color #1
1570 set_lr_margin smglr ML T{
1571 Set both left and right margins to #1, #2. (ML is not in BSD termcap).
1573 set_page_length slines YZ T{
1574 Set page length to #1 lines
1576 set_tb_margin smgtb MT T{
1577 Sets both top and bottom margins to #1, #2
1583 The XSI Curses standard added these. They are some post-4.1
1584 versions of System V curses, e.g., Solaris 2.5 and IRIX 6.x.
1585 The \fBncurses\fR termcap names for them are invented; according to the
1586 XSI Curses standard, they have no termcap names. If your compiled terminfo
1587 entries use these, they may not be binary-compatible with System V terminfo
1588 entries after SVr4.1; beware!
1596 \fBVariable Cap- TCap Description\fR
1597 \fBString name Code\fR
1598 enter_horizontal_hl_mode ehhlm Xh T{
1599 Enter horizontal highlight mode
1601 enter_left_hl_mode elhlm Xl T{
1602 Enter left highlight mode
1604 enter_low_hl_mode elohlm Xo T{
1605 Enter low highlight mode
1607 enter_right_hl_mode erhlm Xr T{
1608 Enter right highlight mode
1610 enter_top_hl_mode ethlm Xt T{
1611 Enter top highlight mode
1613 enter_vertical_hl_mode evhlm Xv T{
1614 Enter vertical highlight mode
1616 set_a_attributes sgr1 sA T{
1617 Define second set of video attributes #1-#6
1619 set_pglen_inch slength sL T{
1620 YI Set page length to #1 hundredth of an inch
1624 .\" $Id: terminfo.tail,v 1.38 2003/01/05 22:47:05 tom Exp $
1625 .\" Beginning of terminfo.tail file
1630 The following entry, describing an ANSI-standard terminal, is representative
1631 of what a \fBterminfo\fR entry for a modern terminal typically looks like.
1637 \s-2ansi|ansi/pc-term compatible with color,
1639 colors#8, ncv#3, pairs#64,
1640 cub=\\E[%p1%dD, cud=\\E[%p1%dB, cuf=\\E[%p1%dC,
1641 cuu=\\E[%p1%dA, dch=\\E[%p1%dP, dl=\\E[%p1%dM,
1642 ech=\\E[%p1%dX, el1=\\E[1K, hpa=\\E[%p1%dG, ht=\\E[I,
1643 ich=\\E[%p1%d@, il=\\E[%p1%dL, indn=\\E[%p1%dS, .indn=\\E[%p1%dT,
1644 kbs=^H, kcbt=\\E[Z, kcub1=\\E[D, kcud1=\\E[B,
1645 kcuf1=\\E[C, kcuu1=\\E[A, kf1=\\E[M, kf10=\\E[V,
1646 kf11=\\E[W, kf12=\\E[X, kf2=\\E[N, kf3=\\E[O, kf4=\\E[P,
1647 kf5=\\E[Q, kf6=\\E[R, kf7=\\E[S, kf8=\\E[T, kf9=\\E[U,
1648 kich1=\\E[L, mc4=\\E[4i, mc5=\\E[5i, nel=\\r\\E[S,
1649 op=\\E[37;40m, rep=%p1%c\\E[%p2%{1}%-%db,
1650 rin=\\E[%p1%dT, s0ds=\\E(B, s1ds=\\E)B, s2ds=\\E*B,
1651 s3ds=\\E+B, setab=\\E[4%p1%dm, setaf=\\E[3%p1%dm,
1652 setb=\\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
1653 setf=\\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
1654 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,
1655 sgr0=\\E[0;10m, tbc=\\E[2g, u6=\\E[%d;%dR, u7=\\E[6n,
1656 u8=\\E[?%[;0123456789]c, u9=\\E[c, vpa=\\E[%p1%dd,\s+2
1661 Entries may continue onto multiple lines by placing white space at
1662 the beginning of each line except the first.
1663 Comments may be included on lines beginning with ``#''.
1667 Boolean capabilities which indicate that the terminal has
1668 some particular feature, numeric capabilities giving the size of the terminal
1669 or the size of particular delays, and string
1670 capabilities, which give a sequence which can be used to perform particular
1671 terminal operations.
1673 .SS Types of Capabilities
1675 All capabilities have names.
1676 For instance, the fact that
1677 ANSI-standard terminals have
1678 .I "automatic margins"
1679 (i.e., an automatic return and line-feed
1680 when the end of a line is reached) is indicated by the capability \fBam\fR.
1681 Hence the description of ansi includes \fBam\fR.
1682 Numeric capabilities are followed by the character `#' and then a positive value.
1683 Thus \fBcols\fR, which indicates the number of columns the terminal has,
1684 gives the value `80' for ansi.
1685 Values for numeric capabilities may be specified in decimal, octal or hexadecimal,
1686 using the C programming language conventions (e.g., 255, 0377 and 0xff or 0xFF).
1688 Finally, string valued capabilities, such as \fBel\fR (clear to end of line
1689 sequence) are given by the two-character code, an `=', and then a string
1690 ending at the next following `,'.
1692 A number of escape sequences are provided in the string valued capabilities
1693 for easy encoding of characters there.
1694 Both \fB\eE\fR and \fB\ee\fR
1695 map to an \s-1ESCAPE\s0 character,
1696 \fB^x\fR maps to a control-x for any appropriate x, and the sequences
1697 \fB\en \el \er \et \eb \ef \es\fR give
1698 a newline, line-feed, return, tab, backspace, form-feed, and space.
1699 Other escapes include \fB\e^\fR for \fB^\fR,
1700 \fB\e\e\fR for \fB\e\fR,
1701 \fB\e\fR, for comma,
1702 \fB\e:\fR for \fB:\fR,
1703 and \fB\e0\fR for null.
1704 (\fB\e0\fR will produce \e200, which does not terminate a string but behaves
1705 as a null character on most terminals, providing CS7 is specified.
1707 Finally, characters may be given as three octal digits after a \fB\e\fR.
1709 A delay in milliseconds may appear anywhere in a string capability, enclosed in
1710 $<..> brackets, as in \fBel\fP=\eEK$<5>, and padding characters are supplied by
1712 to provide this delay.
1713 The delay must be a number with at most one decimal
1714 place of precision; it may be followed by suffixes `*' or '/' or both.
1716 indicates that the padding required is proportional to the number of lines
1717 affected by the operation, and the amount given is the per-affected-unit
1719 (In the case of insert character, the factor is still the
1722 affected.) Normally, padding is advisory if the device has the \fBxon\fR
1723 capability; it is used for cost computation but does not trigger delays.
1725 suffix indicates that the padding is mandatory and forces a delay of the given
1726 number of milliseconds even on devices for which \fBxon\fR is present to
1727 indicate flow control.
1729 Sometimes individual capabilities must be commented out.
1730 To do this, put a period before the capability name.
1731 For example, see the second
1733 in the example above.
1737 .SS Fetching Compiled Descriptions
1739 If the environment variable TERMINFO is set, it is interpreted as the pathname
1740 of a directory containing the compiled description you are working on.
1742 that directory is searched.
1744 If TERMINFO is not set, the \fBncurses\fR version of the terminfo reader code
1745 will instead look in the directory \fB$HOME/.terminfo\fR
1746 for a compiled description.
1747 If it fails to find one there, and the environment variable TERMINFO_DIRS is
1748 set, it will interpret the contents of that variable as a list of colon-
1749 separated directories to be searched (an empty entry is interpreted as a
1750 command to search \fI\*d\fR).
1751 If no description is found in any of the
1752 TERMINFO_DIRS directories, the fetch fails.
1754 If neither TERMINFO nor TERMINFO_DIRS is set, the last place tried will be the
1755 system terminfo directory, \fI\*d\fR.
1757 (Neither the \fB$HOME/.terminfo\fR lookups nor TERMINFO_DIRS extensions are
1758 supported under stock System V terminfo/curses.)
1760 .SS Preparing Descriptions
1762 We now outline how to prepare descriptions of terminals.
1763 The most effective way to prepare a terminal description is by imitating
1764 the description of a similar terminal in
1766 and to build up a description gradually, using partial descriptions
1769 or some other screen-oriented program to check that they are correct.
1770 Be aware that a very unusual terminal may expose deficiencies in
1774 or bugs in the screen-handling code of the test program.
1776 To get the padding for insert line right (if the terminal manufacturer
1777 did not document it) a severe test is to edit a large file at 9600 baud,
1778 delete 16 or so lines from the middle of the screen, then hit the `u'
1779 key several times quickly.
1780 If the terminal messes up, more padding is usually needed.
1781 A similar test can be used for insert character.
1783 .SS Basic Capabilities
1785 The number of columns on each line for the terminal is given by the
1786 \fBcols\fR numeric capability.
1787 If the terminal is a \s-1CRT\s0, then the
1788 number of lines on the screen is given by the \fBlines\fR capability.
1789 If the terminal wraps around to the beginning of the next line when
1790 it reaches the right margin, then it should have the \fBam\fR capability.
1791 If the terminal can clear its screen, leaving the cursor in the home
1792 position, then this is given by the \fBclear\fR string capability.
1793 If the terminal overstrikes
1794 (rather than clearing a position when a character is struck over)
1795 then it should have the \fBos\fR capability.
1796 If the terminal is a printing terminal, with no soft copy unit,
1802 applies to storage scope terminals, such as \s-1TEKTRONIX\s+1 4010
1803 series, as well as hard copy and APL terminals.)
1804 If there is a code to move the cursor to the left edge of the current
1807 (Normally this will be carriage return, control M.)
1808 If there is a code to produce an audible signal (bell, beep, etc)
1812 If there is a code to move the cursor one position to the left
1813 (such as backspace) that capability should be given as
1815 Similarly, codes to move to the right, up, and down should be
1821 These local cursor motions should not alter the text they pass over,
1822 for example, you would not normally use `\fBcuf1\fP=\ ' because the
1823 space would erase the character moved over.
1825 A very important point here is that the local cursor motions encoded
1828 are undefined at the left and top edges of a \s-1CRT\s0 terminal.
1829 Programs should never attempt to backspace around the left edge,
1833 and never attempt to go up locally off the top.
1834 In order to scroll text up, a program will go to the bottom left corner
1835 of the screen and send the
1839 To scroll text down, a program goes to the top left corner
1840 of the screen and sends the
1842 (reverse index) string.
1847 are undefined when not on their respective corners of the screen.
1849 Parameterized versions of the scrolling sequences are
1853 which have the same semantics as
1857 except that they take one parameter, and scroll that many lines.
1858 They are also undefined except at the appropriate edge of the screen.
1860 The \fBam\fR capability tells whether the cursor sticks at the right
1861 edge of the screen when text is output, but this does not necessarily
1864 from the last column.
1865 The only local motion which is defined from the left edge is if
1869 from the left edge will move to the right edge of the previous row.
1872 is not given, the effect is undefined.
1873 This is useful for drawing a box around the edge of the screen, for example.
1874 If the terminal has switch selectable automatic margins,
1877 file usually assumes that this is on; i.e., \fBam\fR.
1878 If the terminal has a command which moves to the first column of the next
1879 line, that command can be given as
1882 It does not matter if the command clears the remainder of the current line,
1883 so if the terminal has no
1887 it may still be possible to craft a working
1889 out of one or both of them.
1891 These capabilities suffice to describe hard-copy and \*(lqglass-tty\*(rq terminals.
1892 Thus the model 33 teletype is described as
1898 \s-133\||\|tty33\||\|tty\||\|model 33 teletype,
1899 bel=^G, cols#72, cr=^M, cud1=^J, hc, ind=^J, os,\s+1
1903 while the Lear Siegler \s-1ADM\-3\s0 is described as
1909 \s-1adm3\||\|3\||\|lsi adm3,
1910 am, bel=^G, clear=^Z, cols#80, cr=^M, cub1=^H, cud1=^J,
1911 ind=^J, lines#24,\s+1
1916 .SS Parameterized Strings
1918 Cursor addressing and other strings requiring parameters
1919 in the terminal are described by a
1920 parameterized string capability, with
1922 like escapes \fB%x\fR in it.
1923 For example, to address the cursor, the
1925 capability is given, using two parameters:
1926 the row and column to address to.
1927 (Rows and columns are numbered from zero and refer to the
1928 physical screen visible to the user, not to any unseen memory.)
1929 If the terminal has memory relative cursor addressing,
1930 that can be indicated by
1933 The parameter mechanism uses a stack and special \fB%\fP codes
1935 Typically a sequence will push one of the
1936 parameters onto the stack and then print it in some format.
1937 Print (e.g., "%d") is a special case.
1938 Other operations, including "%t" pop their operand from the stack.
1939 It is noted that more complex operations are often necessary,
1940 e.g., in the \fBsgr\fP string.
1942 The \fB%\fR encodings have the following meanings:
1948 %\fI[[\fP:\fI]flags][width[.precision]][\fPdoxXs\fI]\fP
1949 as in \fBprintf\fP, flags are [-+#] and space
1952 print pop() like %c in \fBprintf\fP
1955 print pop() like %s in \fBprintf\fP
1958 push \fIi\fP'th parameter
1961 set dynamic variable [a-z] to pop()
1964 get dynamic variable [a-z] and push it
1967 set static variable [a-z] to pop()
1970 get static variable [a-z] and push it
1972 The terms "static" and "dynamic" are misleading.
1973 Historically, these are simply two different sets of variables,
1974 whose values are not reset between calls to \fBtparm\fP.
1975 However, that fact is not documented in other implementations.
1976 Relying on it will adversely impact portability to other implementations.
1979 char constant \fIc\fP
1982 integer constant \fInn\fP
1988 arithmetic (%m is mod): push(pop() op pop())
1991 bit operations: push(pop() op pop())
1994 logical operations: push(pop() op pop())
1997 logical and & or operations (for conditionals)
2000 unary operations push(op pop())
2003 add 1 to first two parameters (for ANSI terminals)
2005 %? \fIexpr\fP %t \fIthenpart\fP %e \fIelsepart\fP %;
2006 if-then-else, %e \fIelsepart\fP is optional.
2007 else-if's are possible a la Algol 68:
2009 %? 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 %;
2011 c\di\u are conditions, b\di\u are bodies.
2013 Binary operations are in postfix form with the operands in the usual order.
2014 That is, to get x-5 one would use "%gx%{5}%-".
2015 %P and %g variables are
2016 persistent across escape-string evaluations.
2018 Consider the HP2645, which, to get to row 3 and column 12, needs
2019 to be sent \eE&a12c03Y padded for 6 milliseconds.
2021 of the rows and columns is inverted here, and that the row and column
2022 are printed as two digits.
2023 Thus its \fBcup\fR capability is \*(lqcup=6\eE&%p2%2dc%p1%2dY\*(rq.
2025 The Microterm \s-1ACT-IV\s0 needs the current row and column sent
2026 preceded by a \fB^T\fR, with the row and column simply encoded in binary,
2027 \*(lqcup=^T%p1%c%p2%c\*(rq.
2028 Terminals which use \*(lq%c\*(rq need to be able to
2029 backspace the cursor (\fBcub1\fR),
2030 and to move the cursor up one line on the screen (\fBcuu1\fR).
2031 This is necessary because it is not always safe to transmit \fB\en\fR
2032 \fB^D\fR and \fB\er\fR, as the system may change or discard them.
2033 (The library routines dealing with terminfo set tty modes so that
2034 tabs are never expanded, so \et is safe to send.
2035 This turns out to be essential for the Ann Arbor 4080.)
2037 A final example is the \s-1LSI ADM\s0-3a, which uses row and column
2038 offset by a blank character, thus \*(lqcup=\eE=%p1%' '%+%c%p2%' '%+%c\*(rq.
2039 After sending `\eE=', this pushes the first parameter, pushes the
2040 ASCII value for a space (32), adds them (pushing the sum on the stack
2041 in place of the two previous values) and outputs that value as a character.
2042 Then the same is done for the second parameter.
2043 More complex arithmetic is possible using the stack.
2047 If the terminal has a fast way to home the cursor
2048 (to very upper left corner of screen) then this can be given as
2049 \fBhome\fR; similarly a fast way of getting to the lower left-hand corner
2050 can be given as \fBll\fR; this may involve going up with \fBcuu1\fR
2051 from the home position,
2052 but a program should never do this itself (unless \fBll\fR does) because it
2053 can make no assumption about the effect of moving up from the home position.
2054 Note that the home position is the same as addressing to (0,0):
2055 to the top left corner of the screen, not of memory.
2056 (Thus, the \eEH sequence on HP terminals cannot be used for
2059 If the terminal has row or column absolute cursor addressing,
2060 these can be given as single parameter capabilities
2062 (horizontal position absolute)
2065 (vertical position absolute).
2066 Sometimes these are shorter than the more general two parameter
2067 sequence (as with the hp2645) and can be used in preference to
2069 If there are parameterized local motions (e.g., move
2071 spaces to the right) these can be given as
2077 with a single parameter indicating how many spaces to move.
2078 These are primarily useful if the terminal does not have
2080 such as the \s-1TEKTRONIX\s+1 4025.
2082 If the terminal needs to be in a special mode when running
2083 a program that uses these capabilities,
2084 the codes to enter and exit this mode can be given as \fBsmcup\fR and \fBrmcup\fR.
2085 This arises, for example, from terminals like the Concept with more than
2087 If the terminal has only memory relative cursor addressing and not screen
2088 relative cursor addressing, a one screen-sized window must be fixed into
2089 the terminal for cursor addressing to work properly.
2090 This is also used for the \s-1TEKTRONIX\s+1 4025,
2093 sets the command character to be the one used by terminfo.
2094 If the \fBsmcup\fP sequence will not restore the screen after an
2095 \fBrmcup\fP sequence is output (to the state prior to outputting
2096 \fBrmcup\fP), specify \fBnrrmc\fP.
2100 If the terminal can clear from the current position to the end of the
2101 line, leaving the cursor where it is, this should be given as \fBel\fR.
2102 If the terminal can clear from the beginning of the line to the current
2103 position inclusive, leaving
2104 the cursor where it is, this should be given as \fBel1\fP.
2105 If the terminal can clear from the current position to the end of the
2106 display, then this should be given as \fBed\fR.
2107 \fBEd\fR is only defined from the first column of a line.
2108 (Thus, it can be simulated by a request to delete a large number of lines,
2113 .SS Insert/delete line and vertical motions
2115 If the terminal can open a new blank line before the line where the cursor
2116 is, this should be given as \fBil1\fR; this is done only from the first
2118 The cursor must then appear on the newly blank line.
2119 If the terminal can delete the line which the cursor is on, then this
2120 should be given as \fBdl1\fR; this is done only from the first position on
2121 the line to be deleted.
2126 which take a single parameter and insert or delete that many lines can
2132 If the terminal has a settable scrolling region (like the vt100)
2133 the command to set this can be described with the
2135 capability, which takes two parameters:
2136 the top and bottom lines of the scrolling region.
2137 The cursor position is, alas, undefined after using this command.
2139 It is possible to get the effect of insert or delete line using
2141 on a properly chosen region; the
2145 (save and restore cursor) commands may be useful for ensuring that
2146 your synthesized insert/delete string does not move the cursor.
2147 (Note that the \fBncurses\fR(3X) library does this synthesis
2148 automatically, so you need not compose insert/delete strings for
2149 an entry with \fBcsr\fR).
2151 Yet another way to construct insert and delete might be to use a combination of
2152 index with the memory-lock feature found on some terminals (like the HP-700/90
2153 series, which however also has insert/delete).
2155 Inserting lines at the top or bottom of the screen can also be
2160 on many terminals without a true insert/delete line,
2161 and is often faster even on terminals with those features.
2163 The boolean \fBnon_dest_scroll_region\fR should be set if each scrolling
2164 window is effectively a view port on a screen-sized canvas.
2166 this capability, create a scrolling region in the middle of the screen,
2167 write something to the bottom line, move the cursor to the top of the region,
2168 and do \fBri\fR followed by \fBdl1\fR or \fBind\fR.
2169 If the data scrolled
2170 off the bottom of the region by the \fBri\fR re-appears, then scrolling
2172 System V and XSI Curses expect that \fBind\fR, \fBri\fR,
2173 \fBindn\fR, and \fBrin\fR will simulate destructive scrolling; their
2174 documentation cautions you not to define \fBcsr\fR unless this is true.
2175 This \fBcurses\fR implementation is more liberal and will do explicit erases
2176 after scrolling if \fBndstr\fR is defined.
2178 If the terminal has the ability to define a window as part of
2179 memory, which all commands affect,
2180 it should be given as the parameterized string
2182 The four parameters are the starting and ending lines in memory
2183 and the starting and ending columns in memory, in that order.
2185 If the terminal can retain display memory above, then the
2186 \fBda\fR capability should be given; if display memory can be retained
2187 below, then \fBdb\fR should be given.
2189 that deleting a line or scrolling may bring non-blank lines up from below
2190 or that scrolling back with \fBri\fR may bring down non-blank lines.
2192 .SS Insert/Delete Character
2194 There are two basic kinds of intelligent terminals with respect to
2195 insert/delete character which can be described using
2197 The most common insert/delete character operations affect only the characters
2198 on the current line and shift characters off the end of the line rigidly.
2199 Other terminals, such as the Concept 100 and the Perkin Elmer Owl, make
2200 a distinction between typed and untyped blanks on the screen, shifting
2201 upon an insert or delete only to an untyped blank on the screen which is
2202 either eliminated, or expanded to two untyped blanks.
2203 You can determine the
2204 kind of terminal you have by clearing the screen and then typing
2205 text separated by cursor motions.
2206 Type \*(lqabc\ \ \ \ def\*(rq using local
2207 cursor motions (not spaces) between the \*(lqabc\*(rq and the \*(lqdef\*(rq.
2208 Then position the cursor before the \*(lqabc\*(rq and put the terminal in insert
2210 If typing characters causes the rest of the line to shift
2211 rigidly and characters to fall off the end, then your terminal does
2212 not distinguish between blanks and untyped positions.
2213 If the \*(lqabc\*(rq
2214 shifts over to the \*(lqdef\*(rq which then move together around the end of the
2215 current line and onto the next as you insert, you have the second type of
2216 terminal, and should give the capability \fBin\fR, which stands for
2217 \*(lqinsert null\*(rq.
2218 While these are two logically separate attributes (one line versus multi-line
2219 insert mode, and special treatment of untyped spaces) we have seen no
2220 terminals whose insert mode cannot be described with the single attribute.
2222 Terminfo can describe both terminals which have an insert mode, and terminals
2223 which send a simple sequence to open a blank position on the current line.
2224 Give as \fBsmir\fR the sequence to get into insert mode.
2225 Give as \fBrmir\fR the sequence to leave insert mode.
2226 Now give as \fBich1\fR any sequence needed to be sent just before sending
2227 the character to be inserted.
2228 Most terminals with a true insert mode
2229 will not give \fBich1\fR; terminals which send a sequence to open a screen
2230 position should give it here.
2232 If your terminal has both, insert mode is usually preferable to \fBich1\fR.
2233 Technically, you should not give both unless the terminal actually requires
2234 both to be used in combination.
2235 Accordingly, some non-curses applications get
2236 confused if both are present; the symptom is doubled characters in an update
2238 This requirement is now rare; most \fBich\fR sequences do not
2239 require previous smir, and most smir insert modes do not require \fBich1\fR
2240 before each character.
2241 Therefore, the new \fBcurses\fR actually assumes this
2242 is the case and uses either \fBrmir\fR/\fBsmir\fR or \fBich\fR/\fBich1\fR as
2243 appropriate (but not both).
2244 If you have to write an entry to be used under
2245 new curses for a terminal old enough to need both, include the
2246 \fBrmir\fR/\fBsmir\fR sequences in \fBich1\fR.
2248 If post insert padding is needed, give this as a number of milliseconds
2249 in \fBip\fR (a string option).
2250 Any other sequence which may need to be
2251 sent after an insert of a single character may also be given in \fBip\fR.
2252 If your terminal needs both to be placed into an `insert mode' and
2253 a special code to precede each inserted character, then both
2257 can be given, and both will be used.
2260 capability, with one parameter,
2262 will repeat the effects of
2267 If padding is necessary between characters typed while not
2268 in insert mode, give this as a number of milliseconds padding in \fBrmp\fP.
2270 It is occasionally necessary to move around while in insert mode
2271 to delete characters on the same line (e.g., if there is a tab after
2272 the insertion position).
2273 If your terminal allows motion while in
2274 insert mode you can give the capability \fBmir\fR to speed up inserting
2276 Omitting \fBmir\fR will affect only speed.
2278 (notably Datamedia's) must not have \fBmir\fR because of the way their
2281 Finally, you can specify
2283 to delete a single character,
2289 and delete mode by giving \fBsmdc\fR and \fBrmdc\fR
2290 to enter and exit delete mode (any mode the terminal needs to be placed
2297 characters (equivalent to outputting
2299 blanks without moving the cursor)
2304 .SS "Highlighting, Underlining, and Visible Bells"
2306 If your terminal has one or more kinds of display attributes,
2307 these can be represented in a number of different ways.
2308 You should choose one display form as
2309 \f2standout mode\fR,
2310 representing a good, high contrast, easy-on-the-eyes,
2311 format for highlighting error messages and other attention getters.
2312 (If you have a choice, reverse video plus half-bright is good,
2313 or reverse video alone.)
2314 The sequences to enter and exit standout mode
2315 are given as \fBsmso\fR and \fBrmso\fR, respectively.
2316 If the code to change into or out of standout
2317 mode leaves one or even two blank spaces on the screen,
2318 as the TVI 912 and Teleray 1061 do,
2319 then \fBxmc\fR should be given to tell how many spaces are left.
2321 Codes to begin underlining and end underlining can be given as \fBsmul\fR
2322 and \fBrmul\fR respectively.
2323 If the terminal has a code to underline the current character and move
2324 the cursor one space to the right,
2325 such as the Microterm Mime,
2326 this can be given as \fBuc\fR.
2328 Other capabilities to enter various highlighting modes include
2332 (bold or extra bright)
2334 (dim or half-bright)
2336 (blanking or invisible text)
2346 (enter alternate character set mode)
2349 (exit alternate character set mode).
2350 Turning on any of these modes singly may or may not turn off other modes.
2352 If there is a sequence to set arbitrary combinations of modes,
2353 this should be given as
2356 taking 9 parameters.
2357 Each parameter is either 0 or nonzero, as the corresponding attribute is on or off.
2358 The 9 parameters are, in order:
2359 standout, underline, reverse, blink, dim, bold, blank, protect, alternate
2361 Not all modes need be supported by
2363 only those for which corresponding separate attribute commands exist.
2365 For example, the DEC vt220 supports most of the modes:
2372 \fBtparm parameter attribute escape sequence\fP
2375 p1 standout \\E[0;1;7m
2376 p2 underline \\E[0;4m
2379 p5 dim not available
2383 p9 altcharset ^O (off) ^N (on)
2386 We begin each escape sequence by turning off any existing modes, since
2387 there is no quick way to determine whether they are active.
2388 Standout is set up to be the combination of reverse and bold.
2389 The vt220 terminal has a protect mode,
2390 though it is not commonly used in sgr
2391 because it protects characters on the screen from the host's erasures.
2392 The altcharset mode also is different in that it is either ^O or ^N,
2393 depending on whether it is off or on.
2394 If all modes are turned on, the resulting sequence is \\E[0;1;4;5;7;8m^N.
2396 Some sequences are common to different modes.
2397 For example, ;7 is output when either p1 or p3 is true, that is, if
2398 either standout or reverse modes are turned on.
2400 Writing out the above sequences, along with their dependencies yields
2407 \fBsequence when to output terminfo translation\fP
2410 ;1 if p1 or p6 %?%p1%p6%|%t;1%;
2411 ;4 if p2 %?%p2%|%t;4%;
2412 ;5 if p4 %?%p4%|%t;5%;
2413 ;7 if p1 or p3 %?%p1%p3%|%t;7%;
2414 ;8 if p7 %?%p7%|%t;8%;
2416 ^N or ^O if p9 ^N, else ^O %?%p9%t^N%e^O%;
2419 Putting this all together into the sgr sequence gives:
2422 sgr=\\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;
2423 %?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\\016%e\\017%;,
2426 Remember that if you specify sgr, you must also specify sgr0.
2428 Terminals with the ``magic cookie'' glitch
2430 deposit special ``cookies'' when they receive mode-setting sequences,
2431 which affect the display algorithm rather than having extra bits for
2433 Some terminals, such as the HP 2621, automatically leave standout
2434 mode when they move to a new line or the cursor is addressed.
2435 Programs using standout mode should exit standout mode before
2436 moving the cursor or sending a newline,
2439 capability, asserting that it is safe to move in standout mode, is present.
2442 a way of flashing the screen to indicate an error quietly (a bell replacement)
2443 then this can be given as \fBflash\fR; it must not move the cursor.
2445 If the cursor needs to be made more visible than normal when it is
2446 not on the bottom line (to make, for example, a non-blinking underline into an
2447 easier to find block or blinking underline)
2448 give this sequence as
2450 If there is a way to make the cursor completely invisible, give that as
2454 should be given which undoes the effects of both of these modes.
2456 If your terminal correctly generates underlined characters
2457 (with no special codes needed)
2458 even though it does not overstrike,
2459 then you should give the capability \fBul\fR.
2460 If a character overstriking another leaves both characters on the screen,
2461 specify the capability \fBos\fP.
2462 If overstrikes are erasable with a blank,
2463 then this should be indicated by giving \fBeo\fR.
2465 .SS Keypad and Function Keys
2467 If the terminal has a keypad that transmits codes when the keys are pressed,
2468 this information can be given.
2469 Note that it is not possible to handle
2470 terminals where the keypad only works in local (this applies, for example,
2471 to the unshifted HP 2621 keys).
2472 If the keypad can be set to transmit or not transmit,
2473 give these codes as \fBsmkx\fR and \fBrmkx\fR.
2474 Otherwise the keypad is assumed to always transmit.
2475 The codes sent by the left arrow, right arrow, up arrow, down arrow,
2476 and home keys can be given as
2477 \fBkcub1, kcuf1, kcuu1, kcud1, \fRand\fB khome\fR respectively.
2478 If there are function keys such as f0, f1, ..., f10, the codes they send
2479 can be given as \fBkf0, kf1, ..., kf10\fR.
2480 If these keys have labels other than the default f0 through f10, the labels
2481 can be given as \fBlf0, lf1, ..., lf10\fR.
2482 The codes transmitted by certain other special keys can be given:
2490 (clear the tab stop in this column),
2492 (clear screen or erase key),
2500 (clear to end of line),
2502 (clear to end of screen),
2504 (insert character or enter insert mode),
2512 (scroll forward/down),
2514 (scroll backward/up),
2516 (set a tab stop in this column).
2517 In addition, if the keypad has a 3 by 3 array of keys including the four
2518 arrow keys, the other five keys can be given as
2525 These keys are useful when the effects of a 3 by 3 directional pad are needed.
2527 Strings to program function keys can be given as
2532 A string to program screen labels should be specified as \fBpln\fP.
2533 Each of these strings takes two parameters: the function key number to
2534 program (from 0 to 10) and the string to program it with.
2535 Function key numbers out of this range may program undefined keys in
2536 a terminal dependent manner.
2537 The difference between the capabilities is that
2539 causes pressing the given key to be the same as the user typing the
2542 causes the string to be executed by the terminal in local; and
2544 causes the string to be transmitted to the computer.
2546 The capabilities \fBnlab\fP, \fBlw\fP and \fBlh\fP
2547 define the number of programmable
2548 screen labels and their width and height.
2549 If there are commands to turn the labels on and off,
2550 give them in \fBsmln\fP and \fBrmln\fP.
2551 \fBsmln\fP is normally output after one or more pln
2552 sequences to make sure that the change becomes visible.
2554 .SS Tabs and Initialization
2556 If the terminal has hardware tabs, the command to advance to the next
2557 tab stop can be given as
2559 (usually control I).
2560 A ``back-tab'' command which moves leftward to the preceding tab stop can
2563 By convention, if the teletype modes indicate that tabs are being
2564 expanded by the computer rather than being sent to the terminal,
2565 programs should not use
2569 even if they are present, since the user may not have the tab stops
2571 If the terminal has hardware tabs which are initially set every
2573 spaces when the terminal is powered up,
2574 the numeric parameter
2576 is given, showing the number of spaces the tabs are set to.
2577 This is normally used by the
2579 command to determine whether to set the mode for hardware tab expansion,
2580 and whether to set the tab stops.
2581 If the terminal has tab stops that can be saved in non-volatile memory,
2582 the terminfo description can assume that they are properly set.
2590 initialization strings for the terminal,
2592 the path name of a program to be run to initialize the terminal,
2593 and \fBif\fR, the name of a file containing long initialization strings.
2594 These strings are expected to set the terminal into modes consistent
2595 with the rest of the terminfo description.
2596 They are normally sent to the terminal, by the
2600 program, each time the user logs in.
2601 They will be printed in the following order:
2607 set the margins using
2622 Most initialization is done with
2624 Special terminal modes can be set up without duplicating strings
2625 by putting the common sequences in
2627 and special cases in
2631 A pair of sequences that does a harder reset from a totally unknown state
2632 can be analogously given as
2642 These strings are output by the
2644 program, which is used when the terminal gets into a wedged state.
2645 Commands are normally placed in
2651 only if they produce annoying effects on the screen and are not
2652 necessary when logging in.
2653 For example, the command to set the vt100 into 80-column mode would
2656 but it causes an annoying glitch of the screen and is not normally
2657 needed since the terminal is usually already in 80 column mode.
2659 If there are commands to set and clear tab stops, they can be given as
2661 (clear all tab stops)
2664 (set a tab stop in the current column of every row).
2665 If a more complex sequence is needed to set the tabs than can be
2666 described by this, the sequence can be placed in
2670 .SS Delays and Padding
2672 Many older and slower terminals don't support either XON/XOFF or DTR
2673 handshaking, including hard copy terminals and some very archaic CRTs
2674 (including, for example, DEC VT100s).
2675 These may require padding characters
2676 after certain cursor motions and screen changes.
2678 If the terminal uses xon/xoff handshaking for flow control (that is,
2679 it automatically emits ^S back to the host when its input buffers are
2682 This capability suppresses the emission of padding.
2684 for memory-mapped console devices effectively that don't have a speed limit.
2685 Padding information should still be included so that routines can
2686 make better decisions about relative costs, but actual pad characters will
2689 If \fBpb\fR (padding baud rate) is given, padding is suppressed at baud rates
2690 below the value of \fBpb\fR.
2691 If the entry has no padding baud rate, then
2692 whether padding is emitted or not is completely controlled by \fBxon\fR.
2694 If the terminal requires other than a null (zero) character as a pad,
2695 then this can be given as \fBpad\fR.
2696 Only the first character of the
2701 Some terminals have an extra `status line' which is not normally used by
2702 software (and thus not counted in the terminal's \fBlines\fR capability).
2704 The simplest case is a status line which is cursor-addressable but not
2705 part of the main scrolling region on the screen; the Heathkit H19 has
2706 a status line of this kind, as would a 24-line VT100 with a 23-line
2707 scrolling region set up on initialization.
2708 This situation is indicated
2709 by the \fBhs\fR capability.
2711 Some terminals with status lines need special sequences to access the
2713 These may be expressed as a string with single parameter
2714 \fBtsl\fR which takes the cursor to a given zero-origin column on the
2716 The capability \fBfsl\fR must return to the main-screen
2717 cursor positions before the last \fBtsl\fR.
2718 You may need to embed the
2719 string values of \fBsc\fR (save cursor) and \fBrc\fR (restore cursor)
2720 in \fBtsl\fR and \fBfsl\fR to accomplish this.
2722 The status line is normally assumed to be the same width as the width
2724 If this is untrue, you can specify it with the numeric
2725 capability \fBwsl\fR.
2727 A command to erase or blank the status line may be specified as \fBdsl\fR.
2729 The boolean capability \fBeslok\fR specifies that escape sequences, tabs,
2730 etc., work ordinarily in the status line.
2732 The \fBncurses\fR implementation does not yet use any of these capabilities.
2733 They are documented here in case they ever become important.
2737 Many terminals have alternate character sets useful for forms-drawing.
2738 Terminfo and \fBcurses\fR build in support for the drawing characters
2739 supported by the VT100, with some characters from the AT&T 4410v1 added.
2740 This alternate character set may be specified by the \fBacsc\fR capability.
2748 \fBGlyph ACS Ascii VT100\fR
2749 \fBName Name Default Name\fR
2750 UK pound sign ACS_STERLING f }
2751 arrow pointing down ACS_DARROW v .
2752 arrow pointing left ACS_LARROW < ,
2753 arrow pointing right ACS_RARROW > +
2754 arrow pointing up ACS_UARROW ^ -
2755 board of squares ACS_BOARD # h
2756 bullet ACS_BULLET o ~
2757 checker board (stipple) ACS_CKBOARD : a
2758 degree symbol ACS_DEGREE \e f
2759 diamond ACS_DIAMOND + `
2760 greater-than-or-equal-to ACS_GEQUAL > z
2762 horizontal line ACS_HLINE - q
2763 lantern symbol ACS_LANTERN # i
2764 large plus or crossover ACS_PLUS + n
2765 less-than-or-equal-to ACS_LEQUAL < y
2766 lower left corner ACS_LLCORNER + m
2767 lower right corner ACS_LRCORNER + j
2768 not-equal ACS_NEQUAL ! |
2769 plus/minus ACS_PLMINUS # g
2770 scan line 1 ACS_S1 ~ o
2771 scan line 3 ACS_S3 - p
2772 scan line 7 ACS_S7 - r
2773 scan line 9 ACS_S9 \&_ s
2774 solid square block ACS_BLOCK # 0
2775 tee pointing down ACS_TTEE + w
2776 tee pointing left ACS_RTEE + u
2777 tee pointing right ACS_LTEE + t
2778 tee pointing up ACS_BTEE + v
2779 upper left corner ACS_ULCORNER + l
2780 upper right corner ACS_URCORNER + k
2781 vertical line ACS_VLINE | x
2784 The best way to define a new device's graphics set is to add a column
2785 to a copy of this table for your terminal, giving the character which
2786 (when emitted between \fBsmacs\fR/\fBrmacs\fR switches) will be rendered
2787 as the corresponding graphic.
2788 Then read off the VT100/your terminal
2789 character pairs right to left in sequence; these become the ACSC string.
2793 Most color terminals are either `Tektronix-like' or `HP-like'.
2795 terminals have a predefined set of N colors (where N usually 8), and can set
2796 character-cell foreground and background characters independently, mixing them
2797 into N * N color-pairs.
2798 On HP-like terminals, the use must set each color
2799 pair up separately (foreground and background are not independently settable).
2800 Up to M color-pairs may be set up from 2*M different colors.
2802 terminals are Tektronix-like.
2804 Some basic color capabilities are independent of the color method.
2806 capabilities \fBcolors\fR and \fBpairs\fR specify the maximum numbers of colors
2807 and color-pairs that can be displayed simultaneously.
2808 The \fBop\fR (original
2809 pair) string resets foreground and background colors to their default values
2811 The \fBoc\fR string resets all colors or color-pairs to
2812 their default values for the terminal.
2813 Some terminals (including many PC
2814 terminal emulators) erase screen areas with the current background color rather
2815 than the power-up default background; these should have the boolean capability
2818 To change the current foreground or background color on a Tektronix-type
2819 terminal, use \fBsetaf\fR (set ANSI foreground) and \fBsetab\fR (set ANSI
2820 background) or \fBsetf\fR (set foreground) and \fBsetb\fR (set background).
2821 These take one parameter, the color number.
2822 The SVr4 documentation describes
2823 only \fBsetaf\fR/\fBsetab\fR; the XPG4 draft says that "If the terminal
2824 supports ANSI escape sequences to set background and foreground, they should
2825 be coded as \fBsetaf\fR and \fBsetab\fR, respectively.
2827 supports other escape sequences to set background and foreground, they should
2828 be coded as \fBsetf\fR and \fBsetb\fR, respectively.
2830 function and the refresh functions use \fBsetaf\fR and \fBsetab\fR if they are
2833 The \fBsetaf\fR/\fBsetab\fR and \fBsetf\fR/\fBsetb\fR capabilities take a
2834 single numeric argument each.
2835 Argument values 0-7 of \fBsetaf\fR/\fBsetab\fR are portably defined as
2836 follows (the middle column is the symbolic #define available in the header for
2837 the \fBcurses\fR or \fBncurses\fR libraries).
2838 The terminal hardware is free to
2839 map these as it likes, but the RGB values indicate normal locations in color
2846 \fBColor #define Value RGB\fR
2847 black \fBCOLOR_BLACK\fR 0 0, 0, 0
2848 red \fBCOLOR_RED\ \fR 1 max,0,0
2849 green \fBCOLOR_GREEN\fR 2 0,max,0
2850 yellow \fBCOLOR_YELLOW\fR 3 max,max,0
2851 blue \fBCOLOR_BLUE\fR 4 0,0,max
2852 magenta \fBCOLOR_MAGENTA\fR 5 max,0,max
2853 cyan \fBCOLOR_CYAN\fR 6 0,max,max
2854 white \fBCOLOR_WHITE\fR 7 max,max,max
2857 The argument values of \fBsetf\fR/\fBsetb\fR historically correspond to
2858 a different mapping, i.e.,
2863 \fBColor #define Value RGB\fR
2864 black \fBCOLOR_BLACK\fR 0 0, 0, 0
2865 blue \fBCOLOR_BLUE\fR 1 0,0,max
2866 green \fBCOLOR_GREEN\fR 2 0,max,0
2867 cyan \fBCOLOR_CYAN\fR 3 0,max,max
2868 red \fBCOLOR_RED\ \fR 4 max,0,0
2869 magenta \fBCOLOR_MAGENTA\fR 5 max,0,max
2870 yellow \fBCOLOR_YELLOW\fR 6 max,max,0
2871 white \fBCOLOR_WHITE\fR 7 max,max,max
2873 It is important to not confuse the two sets of color capabilities;
2874 otherwise red/blue will be interchanged on the display.
2876 On an HP-like terminal, use \fBscp\fR with a color-pair number parameter to set
2877 which color pair is current.
2879 On a Tektronix-like terminal, the capability \fBccc\fR may be present to
2880 indicate that colors can be modified.
2881 If so, the \fBinitc\fR capability will
2882 take a color number (0 to \fBcolors\fR - 1)and three more parameters which
2884 These three parameters default to being interpreted as RGB
2885 (Red, Green, Blue) values.
2886 If the boolean capability \fBhls\fR is present,
2887 they are instead as HLS (Hue, Lightness, Saturation) indices.
2891 On an HP-like terminal, \fBinitp\fR may give a capability for changing a
2893 It will take seven parameters; a color-pair number (0 to
2894 \fBmax_pairs\fR - 1), and two triples describing first background and then
2896 These parameters must be (Red, Green, Blue) or
2897 (Hue, Lightness, Saturation) depending on \fBhls\fR.
2899 On some color terminals, colors collide with highlights.
2901 these collisions with the \fBncv\fR capability.
2902 This is a bit-mask of
2903 attributes not to be used when colors are enabled.
2904 The correspondence with the
2905 attributes understood by \fBcurses\fR is as follows:
2911 \fBAttribute Bit Decimal\fR
2923 For example, on many IBM PC consoles, the underline attribute collides with the
2924 foreground color blue and is not available in color mode.
2926 an \fBncv\fR capability of 2.
2928 SVr4 curses does nothing with \fBncv\fR, ncurses recognizes it and optimizes
2929 the output in favor of colors.
2932 If the terminal requires other than a null (zero) character as a pad, then this
2933 can be given as pad.
2934 Only the first character of the pad string is used.
2935 If the terminal does not have a pad character, specify npc.
2936 Note that ncurses implements the termcap-compatible \fBPC\fR variable;
2937 though the application may set this value to something other than
2938 a null, ncurses will test \fBnpc\fR first and use napms if the terminal
2939 has no pad character.
2941 If the terminal can move up or down half a line,
2942 this can be indicated with
2948 This is primarily useful for superscripts and subscripts on hard-copy terminals.
2949 If a hard-copy terminal can eject to the next page (form feed), give this as
2951 (usually control L).
2953 If there is a command to repeat a given character a given number of
2954 times (to save time transmitting a large number of identical characters)
2955 this can be indicated with the parameterized string
2957 The first parameter is the character to be repeated and the second
2958 is the number of times to repeat it.
2959 Thus, tparm(repeat_char, 'x', 10) is the same as `xxxxxxxxxx'.
2961 If the terminal has a settable command character, such as the \s-1TEKTRONIX\s+1 4025,
2962 this can be indicated with
2964 A prototype command character is chosen which is used in all capabilities.
2965 This character is given in the
2967 capability to identify it.
2968 The following convention is supported on some UNIX systems:
2969 The environment is to be searched for a
2971 variable, and if found, all
2972 occurrences of the prototype character are replaced with the character
2973 in the environment variable.
2975 Terminal descriptions that do not represent a specific kind of known
2984 (generic) capability so that programs can complain that they do not know
2985 how to talk to the terminal.
2986 (This capability does not apply to
2988 terminal descriptions for which the escape sequences are known.)
2990 If the terminal has a ``meta key'' which acts as a shift key,
2991 setting the 8th bit of any character transmitted, this fact can
2994 Otherwise, software will assume that the 8th bit is parity and it
2995 will usually be cleared.
2996 If strings exist to turn this ``meta mode'' on and off, they
3002 If the terminal has more lines of memory than will fit on the screen
3003 at once, the number of lines of memory can be indicated with
3007 indicates that the number of lines is not fixed,
3008 but that there is still more memory than fits on the screen.
3010 If the terminal is one of those supported by the \s-1UNIX\s+1 virtual
3011 terminal protocol, the terminal number can be given as
3015 strings which control an auxiliary printer connected to the terminal
3018 print the contents of the screen,
3020 turn off the printer, and
3022 turn on the printer.
3023 When the printer is on, all text sent to the terminal will be sent
3025 It is undefined whether the text is also displayed on the terminal screen
3026 when the printer is on.
3029 takes one parameter, and leaves the printer on for as many characters
3030 as the value of the parameter, then turns the printer off.
3031 The parameter should not exceed 255.
3034 is transparently passed to the printer while an
3038 .SS Glitches and Braindamage
3040 Hazeltine terminals, which do not allow `~' characters to be displayed should
3043 Terminals which ignore a line-feed immediately after an \fBam\fR wrap,
3044 such as the Concept and vt100,
3045 should indicate \fBxenl\fR.
3049 is required to get rid of standout
3050 (instead of merely writing normal text on top of it),
3051 \fBxhp\fP should be given.
3053 Teleray terminals, where tabs turn all characters moved over to blanks,
3054 should indicate \fBxt\fR (destructive tabs).
3055 Note: the variable indicating this is now `dest_tabs_magic_smso'; in
3056 older versions, it was teleray_glitch.
3057 This glitch is also taken to mean that it is not possible to position
3058 the cursor on top of a ``magic cookie'',
3059 that to erase standout mode it is instead necessary to use
3060 delete and insert line.
3061 The ncurses implementation ignores this glitch.
3063 The Beehive Superbee, which is unable to correctly transmit the escape
3064 or control C characters, has
3066 indicating that the f1 key is used for escape and f2 for control C.
3067 (Only certain Superbees have this problem, depending on the ROM.)
3068 Note that in older terminfo versions, this capability was called
3069 `beehive_glitch'; it is now `no_esc_ctl_c'.
3071 Other specific terminal problems may be corrected by adding more
3072 capabilities of the form \fBx\fR\fIx\fR.
3074 .SS Similar Terminals
3076 If there are two very similar terminals, one (the variant) can be defined as
3077 being just like the other (the base) with certain exceptions.
3079 definition of the variant, the string capability \fBuse\fR can be given with
3080 the name of the base terminal.
3081 The capabilities given before
3083 override those in the base type named by
3085 If there are multiple \fBuse\fR capabilities, they are merged in reverse order.
3086 That is, the rightmost \fBuse\fR reference is processed first, then the one to
3087 its left, and so forth.
3088 Capabilities given explicitly in the entry override
3089 those brought in by \fBuse\fR references.
3091 A capability can be canceled by placing \fBxx@\fR to the left of the
3092 use reference that imports it, where \fIxx\fP is the capability.
3093 For example, the entry
3095 2621-nl, smkx@, rmkx@, use=2621,
3097 defines a 2621-nl that does not have the \fBsmkx\fR or \fBrmkx\fR capabilities,
3098 and hence does not turn on the function key labels when in visual mode.
3099 This is useful for different modes for a terminal, or for different
3102 .SS Pitfalls of Long Entries
3104 Long terminfo entries are unlikely to be a problem; to date, no entry has even
3105 approached terminfo's 4K string-table maximum.
3106 Unfortunately, the termcap
3107 translations are much more strictly limited (to 1K), thus termcap translations
3108 of long terminfo entries can cause problems.
3110 The man pages for 4.3BSD and older versions of tgetent() instruct the user to
3111 allocate a 1K buffer for the termcap entry.
3112 The entry gets null-terminated by
3113 the termcap library, so that makes the maximum safe length for a termcap entry
3115 Depending on what the application and the termcap library
3116 being used does, and where in the termcap file the terminal type that tgetent()
3117 is searching for is, several bad things can happen.
3119 Some termcap libraries print a warning message or exit if they find an
3120 entry that's longer than 1023 bytes; others don't; others truncate the
3121 entries to 1023 bytes.
3122 Some application programs allocate more than
3123 the recommended 1K for the termcap entry; others don't.
3125 Each termcap entry has two important sizes associated with it: before
3126 "tc" expansion, and after "tc" expansion.
3127 "tc" is the capability that
3128 tacks on another termcap entry to the end of the current one, to add
3129 on its capabilities.
3130 If a termcap entry doesn't use the "tc"
3131 capability, then of course the two lengths are the same.
3133 The "before tc expansion" length is the most important one, because it
3134 affects more than just users of that particular terminal.
3136 length of the entry as it exists in /etc/termcap, minus the
3137 backslash-newline pairs, which tgetent() strips out while reading it.
3138 Some termcap libraries strip off the final newline, too (GNU termcap does not).
3142 a termcap entry before expansion is more than 1023 bytes long,
3145 and the application has only allocated a 1k buffer,
3148 and the termcap library (like the one in BSD/OS 1.1 and GNU) reads
3149 the whole entry into the buffer, no matter what its length, to see
3150 if it's the entry it wants,
3153 and tgetent() is searching for a terminal type that either is the
3154 long entry, appears in the termcap file after the long entry, or
3155 doesn't appear in the file at all (so that tgetent() has to search
3156 the whole termcap file).
3158 Then tgetent() will overwrite memory, perhaps its stack, and probably core dump
3160 Programs like telnet are particularly vulnerable; modern telnets
3161 pass along values like the terminal type automatically.
3162 The results are almost
3163 as undesirable with a termcap library, like SunOS 4.1.3 and Ultrix 4.4, that
3164 prints warning messages when it reads an overly long termcap entry.
3166 termcap library truncates long entries, like OSF/1 3.0, it is immune to dying
3167 here but will return incorrect data for the terminal.
3169 The "after tc expansion" length will have a similar effect to the
3170 above, but only for people who actually set TERM to that terminal
3171 type, since tgetent() only does "tc" expansion once it's found the
3172 terminal type it was looking for, not while searching.
3174 In summary, a termcap entry that is longer than 1023 bytes can cause,
3175 on various combinations of termcap libraries and applications, a core
3176 dump, warnings, or incorrect operation.
3177 If it's too long even before
3178 "tc" expansion, it will have this effect even for users of some other
3179 terminal types and users whose TERM variable does not have a termcap
3182 When in -C (translate to termcap) mode, the \fBncurses\fR implementation of
3183 \fBtic\fR(1) issues warning messages when the pre-tc length of a termcap
3184 translation is too long.
3185 The -c (check) option also checks resolved (after tc
3187 .SS Binary Compatibility
3188 It is not wise to count on portability of binary terminfo entries between
3189 commercial UNIX versions.
3190 The problem is that there are at least two versions
3191 of terminfo (under HP-UX and AIX) which diverged from System V terminfo after
3192 SVr1, and have added extension capabilities to the string table that (in the
3193 binary format) collide with System V and XSI Curses extensions.
3195 Some SVr4 \fBcurses\fR implementations, and all previous to SVr4, don't
3196 interpret the %A and %O operators in parameter strings.
3198 SVr4/XPG4 do not specify whether \fBmsgr\fR licenses movement while in
3199 an alternate-character-set mode (such modes may, among other things, map
3200 CR and NL to characters that don't trigger local motions).
3201 The \fBncurses\fR implementation ignores \fBmsgr\fR in \fBALTCHARSET\fR
3203 This raises the possibility that an XPG4
3204 implementation making the opposite interpretation may need terminfo
3205 entries made for \fBncurses\fR to have \fBmsgr\fR turned off.
3207 The \fBncurses\fR library handles insert-character and insert-character modes
3208 in a slightly non-standard way to get better update efficiency.
3210 the \fBInsert/Delete Character\fR subsection above.
3212 The parameter substitutions for \fBset_clock\fR and \fBdisplay_clock\fR are
3213 not documented in SVr4 or the XSI Curses standard.
3214 They are deduced from the
3215 documentation for the AT&T 505 terminal.
3217 Be careful assigning the \fBkmous\fR capability.
3218 The \fBncurses\fR wants to
3219 interpret it as \fBKEY_MOUSE\fR, for use by terminals and emulators like xterm
3220 that can return mouse-tracking information in the keyboard-input stream.
3222 Different commercial ports of terminfo and curses support different subsets of
3223 the XSI Curses standard and (in some cases) different extension sets.
3225 is a summary, accurate as of October 1995:
3227 \fBSVR4, Solaris, ncurses\fR --
3228 These support all SVr4 capabilities.
3231 Supports the SVr4 set, adds one undocumented extended string
3232 capability (\fBset_pglen\fR).
3234 \fBSVr1, Ultrix\fR --
3235 These support a restricted subset of terminfo capabilities.
3237 end with \fBxon_xoff\fR; the numerics with \fBwidth_status_line\fR; and the
3238 strings with \fBprtr_non\fR.
3241 Supports the SVr1 subset, plus the SVr[234] numerics \fBnum_labels\fR,
3242 \fBlabel_height\fR, \fBlabel_width\fR, plus function keys 11 through 63, plus
3243 \fBplab_norm\fR, \fBlabel_on\fR, and \fBlabel_off\fR, plus some incompatible
3244 extensions in the string table.
3247 Supports the SVr1 subset, plus function keys 11 through 63, plus a number
3248 of incompatible string table extensions.
3251 Supports both the SVr4 set and the AIX extensions.
3255 files containing terminal descriptions
3257 \fBtic\fR(1M), \fBcurses\fR(3X), \fBprintf\fR(3S), \fBterm\fR(\*n).
3259 Zeyd M. Ben-Halim, Eric S. Raymond, Thomas E. Dickey.
3260 Based on pcurses by Pavel Curtis.
3262 .\"# The following sets edit modes for GNU EMACS
3263 .\"# Local Variables: