terminfo(4) CLIX terminfo(4)
NAME
terminfo - Terminal capability database
SYNOPSIS
/usr/lib/terminfo/?/*
DESCRIPTION
The terminfo database is a compiled database describing the capabilities,
operations, padding requirements, and specifications for initialization
sequences. This database is used by applications programs, such as vi(1)
and curses(3), and enables a variety of terminals to work with these
programs without making changes to the programs themselves. (See tic(1).)
To obtain the source description for a terminal, use the -I flag of the
infocmp(1) command.
Entries in terminfo source files consist of a number of comma-separated
fields. White space after each comma is ignored. The first line of each
terminal description in the terminfo database gives the name by which
terminfo knows the terminal, separated by bar (|) characters. The first
name given is the most common abbreviation for the terminal (this is the
one to use to set the environment variable TERM in $HOME/.profile (see
profile(4)). The last name given should be a long name fully identifying
the terminal, and all others are understood as synonyms for the terminal
name. All names but the last should contain no blanks and must be unique
in the first 14 characters; the last name may contain blanks for
readability.
Terminal names (except for the last, verbose entry) should be chosen using
the following conventions. The particular piece of hardware making up the
terminal should have a root name chosen; for example, the root name for
the AT&T 4425 terminal is att4425. Possible hardware modes, or user mode
preferences, should be indicated by appending a hyphen and an indicator of
the mode. (See term(4) for examples of choosing names and synonyms.)
In the table on the following page, the Variable is the name by which the
C programmer (at the terminfo level) accesses the capability. The Name is
the short name for this variable used in the text of the database. It is
used by a person updating the database and by the tput(1) command when
asking what the value of the capability is for a particular terminal. The
Code is a two-letter code that corresponds to the old termcap capability
name.
Capability names have no hard length limit, but an informal limit of 5
characters has been adopted to keep them short. Whenever possible, names
are chosen to be the same as, or similar to, the ANSI X3.64-1979 standard.
Semantics are also intended to match those of the specification.
All string capabilities listed below may have padding specified, with the
2/94 - Intergraph Corporation 1
terminfo(4) CLIX terminfo(4)
exception of those used for input. Input capabilities, listed under the
Strings section in the table, have names beginning with key_.
The following indicators may appear at the end of the description as a
variable.
(G) Indicates that the string is passed through tparm() with parameters
(parms) as given (#i).
(*) Indicates that padding may be based on the number of lines
affected.
(#i) Indicates the ith parameter.
Variable Name Code Description
Booleans:
auto_left_margin bw bw cub1 wraps from column 0 to last column
auto_right_margin am am Terminal has automatic margins
no_esc_ctlc xsb xb Beehive (F1=escape, F2=<Ctrl-C>)
ceol_standout_glitch xhp xs Standout not erased by overwriting (hp)
eat_newline_glitch xenl xn Newline ignored after 80 cols (Concept)
erase_overstrike eo eo Can erase overstrikes with a blank
generic_type gn gn Generic line type (for example, dialup, switch).
hard_copy hc hc Hardcopy terminal
hard_cursor chts HC Cursor is hard to see.
has_meta_key km km Has a meta key (shift, sets parity bit)
has_status_line hs hs Has extra ``status line''
insert_null_glitch in in Insert mode distinguishes nulls
memory_above da da Display may be retained above the screen
memory_below db db Display may be retained below the screen
move_insert_mode mir mi Safe to move while in insert mode
move_standout_mode msgr ms Safe to move in standout modes
needs_xon_xoff nxon nx Padding won't work, XON-XOFF required
non_rev_rmcup nrrmc NR smcup does not reverse rmcup
no_pad_char npc NP Pad character doesn't exist
over_strike os os Terminal overstrikes on hard-copy terminal
prtr_silent mc5i 5i Printer won't echo on screen.
status_line_esc_ok eslok es Escape can be used on the status line
dest_tabs_magic_smso xt xt Destructive tabs, magic smso char (t1061)
tilde_glitch hz hz Hazeltine; can't print tildes (~)
transparent_underline ul ul Underline character overstrikes
xon_xoff xon xo Terminal uses XON-XOFF handshaking
Numbers:
columns cols co Number of columns in a line
init_tabs it it Tabs initially every # spaces.
label_height lh lh Number of rows in each label
label_width lw lw Number of cols in each label
2 Intergraph Corporation - 2/94
terminfo(4) CLIX terminfo(4)
lines lines li Number of lines on screen or page
lines_of_memory lm lm Lines of memory if > lines; 0 means varies
magic_cookie_glitch xmc sg Number blank chars left by smso or rmso
num_labels nlab Nl Number of labels on screen (start at 1)
padding_baud_rate pb pb Lowest baud rate where padding needed
virtual_terminal vt vt Virtual terminal number (UNIX system)
width_status_line wsl ws Number of columns in status line
Strings:
acs_chars acsc ac Graphic charset pairs aAbBcC - def=vt100+
back_tab cbt bt Back tab
bell bel bl Audible signal (bell)
carriage_return cr cr Carriage return (*)
change_scroll_region csr cs Change to lines #1 thru #2 (vt100) (G)
char_padding rmp rP Like ip but when in replace mode
clear_all_tabs tbc ct Clear all tab stops
clear_margins mgc MC Clear left and right soft margins
clear_screen clear cl Clear screen and home cursor (*)
clr_bol el1 cb Clear to beginning of line, inclusive
clr_eol el ce Clear to end of line
clr_eos ed cd Clear to end of display (*)
column_address hpa ch Horizontal position absolute (G)
command_character cmdch CC Term. settable cmd char in prototype
cursor_address cup cm Cursor motion to row #1 col #2 (G)
cursor_down cud1 do Down one line
cursor_home home ho Home cursor (if no cup)
cursor_invisible civis vi Make cursor invisible
cursor_left cub1 le Move cursor left one space.
cursor_mem_address mrcup CM Memory relative cursor addressing (G)
cursor_normal cnorm ve Make cursor appear normal (undo vs/vi)
cursor_right cuf1 nd Nondestructive space (cursor right)
cursor_to_ll ll ll Last line, first column (if no cup)
cursor_up cuu1 up Upline (cursor up)
cursor_visible cvvis vs Make cursor very visible
delete_character dch1 dc Delete character (*)
delete_line dl1 dl Delete line (*)
dis_status_line dsl ds Disable status line
down_half_line hd hd Half-line down (forward 1/2 linefeed)
ena_acs enacs eA Enable alternate char set
enter_alt_charset_mode smacs as Start alternate character set
enter_am_mode smam SA Turn on automatic margins
enter_blink_mode blink mb Turn on blinking
enter_bold_mode bold md Turn on bold (extra bright) mode
enter_ca_mode smcup ti String to begin programs that use cup
enter_delete_mode smdc dm Delete mode (enter)
enter_dim_mode dim mh Turn on half-bright mode
enter_insert_mode smir im Insert mode (enter);
enter_protected_mode prot mp Turn on protected mode
enter_reverse_mode rev mr Turn on reverse video mode
2/94 - Intergraph Corporation 3
terminfo(4) CLIX terminfo(4)
enter_secure_mode invis mk Turn on blank mode (chars invisible)
enter_standout_mode smso so Begin standout mode
enter_underline_mode smul us Start underscore mode
enter_xon_mode smxon SX Turn on XON-XOFF handshaking
erase_chars ech ec Erase #1 characters (G)
exit_alt_charset_mode rmacs ae End alternate character set
exit_am_mode rmam RA Turn off automatic margins
exit_attribute_mode sgr0 me Turn off all attributes
exit_ca_mode rmcup te String to end programs that use cup
exit_delete_mode rmdc ed End delete mode
exit_insert_mode rmir ei End insert mode;
exit_standout_mode rmso se End standout mode
exit_underline_mode rmul ue End underscore mode
exit_xon_mode rmxon RX Turn off XON-XOFF handshaking
flash_screen flash vb Visible bell (may not move cursor)
form_feed ff ff Hardcopy terminal page eject (*)
from_status_line fsl fs Return from status line
init_1string is1 i1 Terminal initialization string
init_2string is2 is Terminal initialization string
init_3string is3 i3 Terminal initialization string
init_file if if Name of initialization file containing is
init_prog iprog iP Pathname of program for init.
insert_character ich1 ic Insert character
insert_line il1 al Add new blank line (*)
insert_padding ip ip Insert pad after character inserted (*)
key_a1 ka1 K1 KEY_A1, 0534, Upper left of keypad
key_a3 ka3 K3 KEY_A3, 0535, Upper right of keypad
key_b2 kb2 K2 KEY_B2, 0536, Center of keypad
key_backspace kbs kb KEY_BACKSPACE, 0407, backspace key
key_beg kbeg @1 KEY_BEG, 0542, beg(inning) key
key_btab kcbt kB KEY_BTAB, 0541, back-tab key
key_c1 kc1 K4 KEY_C1, 0537, Lower left of keypad
key_c3 kc3 K5 KEY_C3, 0540, Lower right of keypad
key_cancel kcan @2 KEY_CANCEL, 0543, cancel key
key_catab ktbc ka KEY_CATAB, 0526, clear-all-tabs key
key_clear kclr kC KEY_CLEAR, 0515, clear-screen or erase key
key_close kclo @3 KEY_CLOSE, 0544, close key
key_command kcmd @4 KEY_COMMAND, 0545, cmd (command) key
key_copy kcpy @5 KEY_COPY, 0546, copy key
key_create kcrt @6 KEY_CREATE, 0547, create key
key_ctab kctab kt KEY_CTAB, 0525, clear-tab key
key_dc kdch1 kD KEY_DC, 0512, delete-character key
key_dl kdl1 kL KEY_DL, 0510, delete-line key
key_down kcud1 kd KEY_DOWN, 0402, terminal down-arrow key
key_eic krmir kM KEY_EIC, 0514, rmir or smir in insert mode
key_end kend @7 KEY_END, 0550, end key
key_enter kent @8 KEY_ENTER, 0527, enter/send key
key_eol kel kE KEY_EOL, 0517, clear-to-end-of-line key
key_eos ked kS KEY_EOS, 0516, clear-to-end-of-screen key
4 Intergraph Corporation - 2/94
terminfo(4) CLIX terminfo(4)
key_exit kext @9 KEY_EXIT, 0551, exit key
key_f0 kf0 k0 KEY_F(0), 0410, function key F0
key_f1 kf1 k1 KEY_F(1), 0411, function key F1
key_f2 kf2 k2 KEY_F(2), 0412, function key F2
key_f3 kf3 k3 KEY_F(3), 0413, function key F3
key_f4 kf4 k4 KEY_F(4), 0414, function key F4
key_f5 kf5 k5 KEY_F(5), 0415, function key F5
key_f6 kf6 k6 KEY_F(6), 0416, function key F6
key_f7 kf7 k7 KEY_F(7), 0417, function key F7
key_f8 kf8 k8 KEY_F(8), 0420, function key F8
key_f9 kf9 k9 KEY_F(9), 0421, function key F9
key_f10 kf10 k; KEY_F(10), 0422, function key F10
key_f11 kf11 F1 KEY_F(11), 0423, function key F11
key_f12 kf12 F2 KEY_F(12), 0424, function key F12
key_f13 kf13 F3 KEY_F(13), 0425, function key F13
key_f14 kf14 F4 KEY_F(14), 0426, function key F14
key_f15 kf15 F5 KEY_F(15), 0427, function key F15
key_f16 kf16 F6 KEY_F(16), 0430, function key F16
key_f17 kf17 F7 KEY_F(17), 0431, function key F17
key_f18 kf18 F8 KEY_F(18), 0432, function key F18
key_f19 kf19 F9 KEY_F(19), 0433, function key F19
key_f20 kf20 FA KEY_F(20), 0434, function key F20
key_f21 kf21 FB KEY_F(21), 0435, function key F21
key_f22 kf22 FC KEY_F(22), 0436, function key F22
key_f23 kf23 FD KEY_F(23), 0437, function key F23
key_f24 kf24 FE KEY_F(24), 0440, function key F24
key_f25 kf25 FF KEY_F(25), 0441, function key F25
key_f26 kf26 FG KEY_F(26), 0442, function key F26
key_f27 kf27 FH KEY_F(27), 0443, function key F27
key_f28 kf28 FI KEY_F(28), 0444, function key F28
key_f29 kf29 FJ KEY_F(29), 0445, function key F29
key_f30 kf30 FK KEY_F(30), 0446, function key F30
key_f31 kf31 FL KEY_F(31), 0447, function key F31
key_f32 kf32 FM KEY_F(32), 0450, function key F32
key_f33 kf33 FN KEY_F(13), 0451, function key F33
key_f34 kf34 FO KEY_F(34), 0452, function key F34
key_f35 kf35 FP KEY_F(35), 0453, function key F35
key_f36 kf36 FQ KEY_F(36), 0454, function key F36
key_f37 kf37 FR KEY_F(37), 0455, function key F37
key_f38 kf38 FS KEY_F(38), 0456, function key F38
key_f39 kf39 FT KEY_F(39), 0457, function key F39
key_f40 kf40 FU KEY_F(40), 0460, function key F40
key_f41 kf41 FV KEY_F(41), 0461, function key F41
key_f42 kf42 FW KEY_F(42), 0462, function key F42
key_f43 kf43 FX KEY_F(43), 0463, function key F43
key_f44 kf44 FY KEY_F(44), 0464, function key F44
key_f45 kf45 FZ KEY_F(45), 0465, function key F45
key_f46 kf46 Fa KEY_F(46), 0466, function key F46
key_f47 kf47 Fb KEY_F(47), 0467, function key F47
2/94 - Intergraph Corporation 5
terminfo(4) CLIX terminfo(4)
key_f48 kf48 Fc KEY_F(48), 0470, function key F48
key_f49 kf49 Fd KEY_F(49), 0471, function key F49
key_f50 kf50 Fe KEY_F(50), 0472, function key F50
key_f51 kf51 Ff KEY_F(51), 0473, function key F51
key_f52 kf52 Fg KEY_F(52), 0474, function key F52
key_f53 kf53 Fh KEY_F(53), 0475, function key F53
key_f54 kf54 Fi KEY_F(54), 0476, function key F54
key_f55 kf55 Fj KEY_F(55), 0477, function key F55
key_f56 kf56 Fk KEY_F(56), 0500, function key F56
key_f57 kf57 Fl KEY_F(57), 0501, function key F57
key_f58 kf58 Fm KEY_F(58), 0502, function key F58
key_f59 kf59 Fn KEY_F(59), 0503, function key F59
key_f60 kf60 Fo KEY_F(60), 0504, function key F60
key_f61 kf61 Fp KEY_F(61), 0505, function key F61
key_f62 kf62 Fq KEY_F(62), 0506, function key F62
key_f63 kf63 Fr KEY_F(63), 0507, function key F63
key_find kfnd @0 KEY_FIND, 0552, find key
key_help khlp %1 KEY_HELP, 0553, help key
key_home khome kh KEY_HOME, 0406, home key
key_ic kich1 kI KEY_IC, 0513, ins-char/enter ins-mode key
key_il kil1 kA KEY_IL, 0511, insert-line key
key_left kcub1 kl KEY_LEFT, 0404, terminal left-arrow key
key_ll kll kH KEY_LL, 0533, home-down key
key_mark kmrk %2 KEY_MARK, 0554, mark key
key_message kmsg %3 KEY_MESSAGE, 0555, message key
key_move kmov %4 KEY_MOVE, 0556, move key
key_next knxt %5 KEY_NEXT, 0557, next-object key
key_npage knp kN KEY_NPAGE, 0522, next-page key
key_open kopn %6 KEY_OPEN, 0560, open key
key_options kopt %7 KEY_OPTIONS, 0561, options key
key_ppage kpp kP KEY_PPAGE, 0523, previous-page key
key_previous kprv %8 KEY_PREVIOUS, 0562, previous-object key
key_print kprt %9 KEY_PRINT, 0532, print or copy key
key_redo krdo %0 KEY_REDO, 0563, redo key
key_reference kref &1 KEY_REFERENCE, 0564, ref(erence) key
key_refresh krfr &2 KEY_REFRESH, 0565, refresh key
key_replace krpl &3 KEY_REPLACE, 0566, replace key
key_restart krst &4 KEY_RESTART, 0567, restart key
key_resume kres &5 KEY_RESUME, 0570, resume key
key_right kcuf1 kr KEY_RIGHT, 0405, terminal right-arrow key
key_save ksav &6 KEY_SAVE, 0571, save key
key_sbeg kBEG &9 KEY_SBEG, 0572, shifted beginning key
key_scancel kCAN &0 KEY_SCANCEL, 0573, shifted cancel key
key_scommand kCMD *1 KEY_SCOMMAND, 0574, shifted command key
key_scopy kCPY *2 KEY_SCOPY, 0575, shifted copy key
key_screate kCRT *3 KEY_SCREATE, 0576, shifted create key
key_sdc kDC *4 KEY_SDC, 0577, shifted delete-char key
key_sdl kDL *5 KEY_SDL, 0600, shifted delete-line key
key_select kslt *6 KEY_SELECT, 0601, select key
6 Intergraph Corporation - 2/94
terminfo(4) CLIX terminfo(4)
key_send kEND *7 KEY_SEND, 0602, shifted end key
key_seol kEOL *8 KEY_SEOL, 0603, shifted clear-line key
key_sexit kEXT *9 KEY_SEXIT, 0604, shifted exit key
key_sf kind kF KEY_SF, 0520, scroll-forward/down key
key_sfind kFND *0 KEY_SFIND, 0605, shifted find key
key_shelp kHLP #1 KEY_SHELP, 0606, shifted help key
key_shome kHOM #2 KEY_SHOME, 0607, shifted home key
key_sic kIC #3 KEY_SIC, 0610, shifted input key
key_sleft kLFT #4 KEY_SLEFT, 0611, shifted left-arrow key
key_smessage kMSG %a KEY_SMESSAGE, 0612, shifted message key
key_smove kMOV %b KEY_SMOVE, 0613, shifted move key
key_snext kNXT %c KEY_SNEXT, 0614, shifted next key
key_soptions kOPT %d KEY_SOPTIONS, 0615, shifted options key
key_sprevious kPRV %e KEY_SPREVIOUS, 0616, shifted prev key
key_sprint kPRT %f KEY_SPRINT, 0617, shifted print key
key_sr kri kR KEY_SR, 0521, scroll-backward/up key
key_sredo kRDO %g KEY_SREDO, 0620, shifted redo key
key_sreplace kRPL %h KEY_SREPLACE, 0621, shifted replace key
key_sright kRIT %i KEY_SRIGHT, 0622, shifted right-arrow key
key_srsume kRES %j KEY_SRSUME, 0623, shifted resume key
key_ssave kSAV !1 KEY_SSAVE, 0624, shifted save key
key_ssuspend kSPD !2 KEY_SSUSPEND, 0625, shifted suspend key
key_stab khts kT KEY_STAB, 0524, set-tab key
key_sundo kUND !3 KEY_SUNDO, 0626, shifted undo key
key_suspend kspd &7 KEY_SUSPEND, 0627, suspend key
key_undo kund &8 KEY_UNDO, 0630, undo key
key_up kcuu1 ku KEY_UP, 0403, terminal up-arrow key
keypad_local rmkx ke Out of ``keypad-transmit'' mode
keypad_xmit smkx ks Put terminal in ``keypad-transmit'' mode
lab_f0 lf0 l0 Labels on function key F0 if not F0
lab_f1 lf1 l1 Labels on function key F1 if not F1
lab_f2 lf2 l2 Labels on function key F2 if not F2
lab_f3 lf3 l3 Labels on function key F3 if not F3
lab_f4 lf4 l4 Labels on function key F4 if not F4
lab_f5 lf5 l5 Labels on function key F5 if not F5
lab_f6 lf6 l6 Labels on function key F6 if not F6
lab_f7 lf7 l7 Labels on function key F7 if not F7
lab_f8 lf8 l8 Labels on function key F8 if not F8
lab_f9 lf9 l9 Labels on function key F9 if not F9
lab_f10 lf10 la Labels on function key F10 if not F10
label_off rmln LF Turn off soft labels
label_on smln LO Turn on soft labels
meta_off rmm mo Turn off ``meta mode''
meta_on smm mm Turn on ``meta mode'' (8th bit)
newline nel nw Newline (behaves like cr followed by lf)
pad_char pad pc Pad character (rather than null)
parm_dch dch DC Delete #1 chars (G*)
parm_delete_line dl DL Delete #1 lines (G*)
parm_down_cursor cud DO Move cursor down #1 lines. (G*)
2/94 - Intergraph Corporation 7
terminfo(4) CLIX terminfo(4)
parm_ich ich IC Insert #1 blank chars (G*)
parm_index indn SF Scroll forward #1 lines. (G)
parm_insert_line il AL Add #1 new blank lines (G*)
parm_left_cursor cub LE Move cursor left #1 spaces (G)
parm_right_cursor cuf RI Move cursor right #1 spaces. (G*)
parm_rindex rin SR Scroll backward #1 lines. (G)
parm_up_cursor cuu UP Move cursor up #1 lines. (G*)
pkey_key pfkey pk Prog funct key #1 to type string #2
pkey_local pfloc pl Prog funct key #1 to execute string #2
pkey_xmit pfx px Prog funct key #1 to xmit string #2
plab_norm pln pn Prog label #1 to show string #2
print_screen mc0 ps Print contents of the screen
prtr_non mc5p pO Turn on the printer for #1 bytes
prtr_off mc4 pf Turn off the printer
prtr_on mc5 po Turn on the printer
repeat_char rep rp Repeat char #1 #2 times (G*)
req_for_input rfi RF Send next input char (for ptys)
reset_1string rs1 r1 Reset terminal completely to sane modes
reset_2string rs2 r2 Reset terminal completely to sane modes
reset_3string rs3 r3 Reset terminal completely to sane modes
reset_file rf rf Name of file containing reset string
restore_cursor rc rc Restore cursor to position of last sc
row_address vpa cv Vertical position absolute (G)
save_cursor sc sc Save cursor position.
scroll_forward ind sf Scroll text up
scroll_reverse ri sr Scroll text down
set_attributes sgr sa Define the video attributes #1-#9 (G)
set_left_margin smgl ML Set soft left margin
set_right_margin smgr MR Set soft right margin
set_tab hts st Set a tab in all rows, current column.
set_window wind wi Current window is lines #1-#2 cols #3-#4 (G)
tab ht ta Tab to next 8 space hardware tab stop.
to_status_line tsl ts Go to status line, col #1 (G)
underline_char uc uc Underscore one char and move past it
up_half_line hu hu Half-line up (reverse 1/2 linefeed)
xoff_character xoffc XF XOFF character
xon_character xonc XN XON character
Sample Entry
The following entry, which describes the Concept-100 terminal, is among
the more complex entries in the terminfo file as of this writing.
c100|concept100|concept|c104|c100-4p|hds concept 100,
am, eo, mir, ul, xenl,
cols#80, lines#24, pb#9600, vt#8,
bel=^G, blink=\EC, clear=\E?\E^E$<2*>, cr=$<9>\r,
cub1=\b, cud1=\n, cuf1=\E=,
cup=\Ea%p1%'\s'%+%c%p2%'\s'%+%c, cuu1=\E;,
dch1=\E^Q$<16*>, dim=\EE, dl1=\E^B$<3*>,
ed=\E^E$<16*>, el=\E^U$<16>, flash=\Ek$<20>\EK,
8 Intergraph Corporation - 2/94
terminfo(4) CLIX terminfo(4)
ht=\t$<8>, il1=\E^R$<3*>, ind=\n, invis=\EH,
ip=$<16*>, is1=\EK,
is2=\EU\Ef\E7\E5\E8\El\ENH\E\200\Eo&\200\Eo'\E\Eo!\200\E^G!\E\bA@\s\E4#:
"\E:a\E4#;"\E:b\E4#<"\E:c,
is3=\Ev\s\s\s\s$<6>\Ep\n, kbs=\b, kcbt=\E', kctab=\E_,
kcub1=\E>, kcud1=\E<, kcuf1=\E=, kcuu1=\E;,
kdch1=\E^Q, kdl1=\E^B, ked=\E^C, kel=\E^S, kf1=\E5,
kf2=\E6, kf3=\E7, kf4=\E8, kf5=\E9, kf6=\E:a,
kf7=\E:b, kf8=\E:c, khome=\E?, khts=\E], kich1=\E^P,
kil1=\E^R, kind=\E[, knp=\E-, kpp=\E., kri=\E\\,
krmir=\E\200, mc4=^^o\s\E\EQ!\EYP^W,
mc5=\EQ"\EY(^W\EYD\Eo\s^^, prot=\EI,
rep=\Er%p1%c%p2%'\s'%+%c$<.2*>, rev=\ED,
rmcup=\Ev\s\s\s\s$<6>\Ep\r\n, rmir=\E\s\s, rmkx=\Ex,
rmso=\Ed, rmul=\Eg, sgr0=\EN@,
smcup=\EU\Ev\s\s8p\Ep\r\E^U$<16>, smir=\E^P, smkx=\EX,
smso=\ED, smul=\EG,
Entries may continue onto multiple lines by placing white space at the
beginning of each line except the first. Lines beginning with ``#'' are
taken as comment lines. Capabilities in the terminfo command are of three
types: boolean capabilities which indicate that the terminal has some
particular feature; numeric capabilities giving the size of the terminal
or particular features; and string capabilities, which give a sequence
which can be used to perform particular terminal operations.
Types of Capabilities
All capabilities have names. For instance, the fact that the Concept has
automatic margins (that is, an automatic return and linefeed when the end
of a line is reached) is indicated by the capability am. Hence the
description of the Concept includes am. Numeric capabilities are followed
by the character # and then the value. Thus cols, which indicates the
number of columns the terminal has, gives the value 80 for the Concept.
The value may be specified in decimal, octal, or hexadecimal using normal
C conventions.
Finally, string-valued capabilities, such as el (clear to end of line
sequence) are given by the two- to five-character capname, an =, and then
a string ending at the next following comma. A delay in milliseconds may
appear anywhere in such a capability, enclosed in $<...> brackets, as in
el=\EK$<3>, and padding characters are supplied by tputs() (see curses(3))
to provide this delay. The delay can be either a number, for example, 20,
or a number followed by a * (that is, 3*), a / (that is, 5/), or both
(that is, 10*/).
A * indicates that the padding required is proportional to the number of
lines affected by the operation, and the amount given is the per-
affected-unit padding required. (In the case of insert character, the
factor is still the number of lines affected. This is always one unless
the terminal has in and the software uses it.) When a * is specified, it
2/94 - Intergraph Corporation 9
terminfo(4) CLIX terminfo(4)
is sometimes useful to give a delay of the form 3.5 to specify a delay per
unit to tenths of milliseconds. (Only one decimal place is allowed.) A /
indicates that the padding is mandatory. Otherwise, if the terminal has
xon defined, the padding information is advisory and will only be used for
cost estimates or when the terminal is in the raw mode. Mandatory padding
will be transmitted regardless of the setting of xon.
A number of escape sequences are provided in the string valued
capabilities for easy encoding of characters there. Both \E and \e map to
an escape character, ^x maps to a <Ctrl-X> for any appropriate x, and the
sequences \n, \l, \r, \t, \b, \f, and \s give a newline, linefeed, return,
tab, backspace, formfeed, and space, respectively. Other escapes include:
\^ for caret (^); \\ for backslash (\); \, for comma (,); \: for colon
(:); and \0 for null. The (\0 will actually produce \200, which does not
terminate a string but behaves as a null character on most terminals.)
Finally, characters may be given as three octal digits after a backslash
(for example, \123).
Sometimes individual capabilities must be commented out. To do this, put
a period before the capability name. For example, see the second ind in
the previous example. Note that capabilities are defined in a left-to-
right order and, therefore, a prior definition will override a later
definition.
Preparing Descriptions
The most effective way to prepare a terminal description is by imitating
the description of a similar terminal in terminfo and to build up a
description gradually, using partial descriptions with vi(1) to check that
they are correct. Be aware that a very unusual terminal may expose
deficiencies in the ability of the terminfo file to describe it or the
inability of vi(1) to work with that terminal. To test a new terminal
description, set the environment variable TERMINFO to a pathname of a
directory containing the compiled description you are working on and
programs will look there rather than in /usr/lib/terminfo. To get the
padding for insert-line correct (if the terminal manufacturer did not
document it) a severe test is to comment out xon, edit a large file at
9600 baud with vi(1), delete 16 or so lines from the middle of the screen,
then press <U> several times quickly. If the display is corrupted, more
padding is usually needed. A similar test can be used for insert-
character.
Basic Capabilities
The number of columns on each line for the terminal is given by the cols
numeric capability. If the terminal has a screen, then the number of
lines on the screen is given by the lines capability. If the terminal
wraps around to the beginning of the next line when it reaches the right
margin, then it should have the am capability. If the terminal can clear
its screen, leaving the cursor in the home position, then this is given by
the clear string capability. If the terminal overstrikes (rather than
10 Intergraph Corporation - 2/94
terminfo(4) CLIX terminfo(4)
clearing a position when a character is struck over) then it should have
the os capability. If the terminal is a printing terminal, with no soft
copy unit, give it both hc and os. (The os applies to storage scope
terminals, such as Tektronix 4010 series, as well as hard-copy and APL
terminals.) If there is a code to move the cursor to the left edge of the
current row, give this as cr. (Normally this will be the <Return> <Ctrl-
M> sequence). If there is a code to produce an audible signal (such as
bell or beep), input this as bel. If the terminal uses the XON-XOFF
flow-control protocol, like most terminals, the user specifies xon.
If there is a code to move the cursor one position to the left (such as
backspace) that capability should be given as cub1. Similarly, codes to
move to the right, up, and down should be given as cuf1, cuu1, and cud1.
These local cursor motions should not alter the text they pass over; for
example, you would not normally use cuf1=\s because the space would erase
the character moved over.
A very important point here is that the local cursor motions encoded in
terminfo are undefined at the left and top edges of a screen terminal.
Programs should never attempt to backspace around the left edge, unless bw
is given, and should never attempt to go up locally off the top. In order
to scroll text up, a program will go to the bottom left corner of the
screen and send the ind (index) string.
To scroll text down, a program goes to the top left corner of the screen
and sends the ri (reverse index) string. The strings ind and ri are
undefined when not on their respective corners of the screen.
Parameterized versions of the scrolling sequences are indn and rin, which
have the same semantics as ind and ri, except that they take one
parameter, and scroll that many lines. They are also undefined except at
the appropriate edge of the screen.
The am capability tells whether the cursor sticks at the right edge of the
screen when text is output, but this does not necessarily apply to a cuf1
from the last column. The only local motion which is defined from the
left edge is if bw is given, then a cub1 from the left edge will move to
the right edge of the previous row. If bw is not given, the effect is
undefined. This is useful for drawing a box around the edge of the
screen, for example. If the terminal has switch selectable automatic
margins, the terminfo file usually assumes that this is on; that is, am.
If the terminal has a command which moves to the first column of the next
line, that command can be given as nel (newline). It does not matter if
the command clears the remainder of the current line, so if the terminal
has no cr and lf it may still be possible to craft a working nel out of
one or both of them. These capabilities suffice to describe hardcopy and
screen terminals. Thus, the Model 33 teletype is described as:
33|tty33|tty|AT&T model 33 teletype,
hc, os, xon,
cols#72,
2/94 - Intergraph Corporation 11
terminfo(4) CLIX terminfo(4)
bel=^G, cr=\r, cud1=\n, ind=\n,
while the Lear Siegler ADM-3 is described as:
adm3|lsi adm3,
am,
cols#80, lines#24,
bel=^G, clear=^Z, cr=\r, cub1=\b, cud1=\n, ind=\n,
Parameterized Strings
Cursor addressing and other strings requiring parameters in the terminal
are described by a parameterized string capability, with printf()-like
escapes (%x) in it. For example, to address the cursor, the cup
capability is given, using two parameters: the row and column to address
to. (Rows and columns are numbered from zero and refer to the physical
screen visible to the user, not to any unseen memory.) If the terminal
has memory relative cursor addressing, that can be indicated by mrcup.
The parameter mechanism uses a stack and special percent sign (%) codes to
manipulate it in the manner of a Reverse Polish Notation (postfix)
calculator. Typically a sequence will push one of the parameters onto the
stack and then print it in some format. Often, more complex operations
are necessary. Binary operations are in postfix form with the operands in
the usual order; that is, to get x-5, one would use %gx%{5}%-.
The % encodings have the following meanings:
%% Outputs %
%[[:]flags] [width[.precision]] [doxXs]
As in printf, flags are -, +, #, and space
%c Print pop() gives %c
%pi Push ith parm (i is 0-9)
%Pvar Set variable var to pop() (var is a-z)
%gvar Get variable var and push it (var is a-z)
%'c' Push char constant c
%{nn} Push decimal constant nn
%l Push strlen(pop())
%+ %- %* %/ %m
Arithmetic (%m is mod): push(pop() op pop())
12 Intergraph Corporation - 2/94
terminfo(4) CLIX terminfo(4)
%& %| %^
Bit operations: push(pop() op pop())
%= %> %<
Logical operations: push(pop() op pop())
%A %O Logical operations: and, or
%! %~ Unary operations: push(op pop())
%i (For ANSI terminals) Add 1 to first parm, if one parm present, or
first two parms, if more than one parm present
%? expr %t thenpart %e elsepart %;
If-then-else, %e elsepart is optional; else-if's are possible ala
Algol 68: %? c1 %t b1 %e c2 %t b2 %e c3 %t b3 %e c4 %t b4 %e b5 %;
ci are conditions, bi are bodies.
If the - flag is used with %[doxXs], then a colon (:) must be placed
between the % and the - to differentiate the flag from the binary %-
operator, for example, %:-16.16s.
The Hewlett-Packard 2645, which, to get to row 3 and column 12, needs to
be sent \E&a12c03Y padded for 6 milliseconds. Note that the order of the
rows and columns is inverted here, and that the row and column are zero-
padded as two digits. Thus its cup capability is
cup=\E&a%p2%2.2dc%p1%2.2dY$<6>.
The Micro-Term ACT-IV needs the current row and column sent, preceded by a
^T, with the row and column simply encoded in binary, cup=^T%p1%c%p2%c.
Terminals which use %c need to be able to backspace the cursor (cub1), and
to move the cursor up one line on the screen (cuu1). This is necessary
because it is not always safe to transmit \n, ^D, and \r, as the system
may change or discard them. (The library functions dealing with terminfo
set tty modes so that tabs are never expanded, so \t is safe to send.
This turns out to be essential for the Ann Arbor 4080.)
A final example is the LSI ADM-3a, which uses row and column offset by a
blank character, thus cup=\E=%p1%'\s'%+%c%p2%'\s'%+%c. After sending \E=,
this pushes the first parameter, pushes the ASCII value for a space (32),
adds them (pushing the sum on the stack in place of the two previous
values), and outputs that value as a character. Then the same is done for
the second parameter. More complex arithmetic is possible using the
stack.
Cursor Motions
If the terminal has a fast way to home the cursor (to very upper left
corner of screen), then this can be given as home; similarly, a fast way
of getting to the lower left-hand corner can be given as ll; this may
involve going up with cuu1 from the home position, but a program should
2/94 - Intergraph Corporation 13
terminfo(4) CLIX terminfo(4)
never do this itself (unless ll does) because it can make no assumption
about the effect of moving up from the home position. Note that the home
position is the same as addressing to (0,0): to the top left corner of
the screen, not of memory. (Thus, the \EH sequence on Hewlett-Packard
terminals cannot be used for home without losing some of the other
features on the terminal.)
If the terminal has row or column absolute-cursor addressing, these can be
given as single parameter capabilities hpa (horizontal position absolute)
and vpa (vertical position absolute). Sometimes these are shorter than
the more general two-parameter sequence (as with the Hewlett-Packard 2645)
and can be used in preference to cup. If there are parameterized local
motions (for example, move n spaces to the right) these can be given as
cud, cub, cuf, and cuu with a single parameter indicating how many spaces
to move. These are primarily useful if the terminal does not have cup,
such as the Tektronix 4025.
Area Clears
If the terminal can clear from the current position to the end of the
line, leaving the cursor where it is, this should be given as el. If the
terminal can clear from the beginning of the line to the current position
inclusive, leaving the cursor where it is, this should be given as el1.
If the terminal can clear from the current position to the end of the
display, then this should be given as ed. However, ed is only defined
from the first column of a line. (Therefore, it can be simulated by a
request to delete a large number of lines if a true ed is not available.)
Insert/delete line
If the terminal can open a new blank line before the line where the cursor
is, this should be given as il1; this is done only from the first position
of a line. The cursor must then appear on the newly blank line. If the
terminal can delete the line which the cursor is on, then this should be
given as dl1; this is done only from the first position on the line to be
deleted. Versions of il1 and dl1 which take a single parameter and insert
or delete that many lines can be given as il and dl.
If the terminal has a settable destructive scrolling region (like the
VT100) the command to set this can be described with the csr capability,
which takes two parameters: the top and bottom lines of the scrolling
region. The cursor position is, undefined after using this command. It
is possible to get the effect of insert or delete line using this command
- the sc and rc (save and restore cursor) commands are also useful.
Inserting lines at the top or bottom of the screen can also be done using
ri or ind on many terminals without a true insert/delete line, and is
often faster on terminals with those features.
To determine whether a terminal has destructive scrolling regions or
nondestructive scrolling regions, create a scrolling region in the middle
of the screen, place data on the bottom line of the scrolling region, move
14 Intergraph Corporation - 2/94
terminfo(4) CLIX terminfo(4)
the cursor to the top line of the scrolling region, and do a reverse index
(ri) followed by a delete line (dl1) or index (ind). If the data that was
originally on the bottom line of the scrolling region was restored into
the scrolling region by the dl1 or ind, then the terminal has
nondestructive scrolling regions. Otherwise, it has destructive scrolling
regions. Do not specify csr if the terminal has nondestructive scrolling
regions, unless ind, ri, indn, rin, dl, and dl1 all simulate destructive
scrolling.
If the terminal has the ability to define a window as part of memory,
which all commands affect, it should be given as the parameterized string
wind. The four parameters are the starting and ending lines in memory and
the starting and ending columns in memory, in that order.
If the terminal can retain display memory, then the da capability should
be given; if display memory can be retained below, then db should be
given. These indicate that deleting a line or scrolling a full screen may
bring nonblank lines up from below or that scrolling back with ri may
bring down nonblank lines.
Insert/Delete Character
There are two basic kinds of intelligent terminals with respect to
insert/delete character operations which can be described using terminfo.
The most common insert/delete character operations affect only the
characters on the current line and shift characters off the end of the
line rigidly. Other terminals, such as the Concept 100 and the Perkin
Elmer Owl, make a distinction between typed and untyped blanks on the
screen, shifting upon an insert or delete only to an untyped blank on the
screen which is either eliminated, or expanded to two untyped blanks. You
can determine the kind of terminal you have by clearing the screen and
then typing text separated by cursor motions.
Type ``abc def'' using local cursor motions (not spaces) between the
abc and the def. Then position the cursor before the abc and put the
terminal in insert mode. If typing characters causes the rest of the line
to shift rigidly and characters to fall off the end, then your terminal
does not distinguish between blanks and untyped positions. If the abc
shifts over to the def which then move together around the end of the
current line and onto the next as you insert, you have the second type of
terminal, and should give the capability in, which stands for ``insert
null.'' While these are two logically separate attributes (one line
versus multiline insert mode, and special treatment of untyped spaces), we
have seen no terminals whose insert mode cannot be described with the
single attribute.
The terminfo command describes both terminals which have an insert mode
and terminals which send a simple sequence to open a blank position on the
current line. Give as smir the sequence to get into insert mode. Input
rmir the sequence to leave insert mode. Now input ich1 any sequence
needed to be sent just before sending the character to be inserted.
2/94 - Intergraph Corporation 15
terminfo(4) CLIX terminfo(4)
Most terminals with a true insert mode will not give ich1; terminals which
send a sequence to open a screen position should give it here. (If your
terminal has both, the insert mode is usually preferable to ich1. Do not
give both unless the terminal actually requires both to be used in
combination.) If post-insert padding is needed, give this as a number of
milliseconds padding in ip (a string option). Any other sequence which
may need to be sent after an insert of a single character may also be
given in ip.
If your terminal needs both to be placed into an ``insert mode'' and a
special code to precede each inserted character, then both smir/rmir and
ich1 can be given, and both will be used. The ich capability, with one
parameter, n, will repeat the effects of ich1 n times.
If padding is necessary between characters typed while not in the insert
mode, give this as a number of milliseconds padding in rmp.
It is occasionally necessary to move around while in the insert mode to
delete characters on the same line (for example, if there is a tab after
the insertion position). If your terminal allows motion while in the
insert mode, you can give the capability mir to speed up inserting in this
case. Omitting mir will affect only speed. Some terminals (notably
Datamedia's) must not have mir because of the way its insert mode works.
The user can specify dch1 to delete a single character, dch with one
parameter, n, to delete n characters, and delete mode by giving smdc and
rmdc to enter and exit delete mode (any mode the terminal needs to be
placed in for dch1 to work).
A command to erase n characters (equivalent to outputting n blanks without
moving the cursor) can be given as ech with one parameter.
Highlighting, Underlining, and Visible Bells
If your terminal has one or more kinds of display attributes, these can be
represented in a number of different ways. You should choose one display
form as standout mode (see curses(3)), representing a good, high contrast,
easy-on-the-eyes, format for highlighting error messages and other
attention getters. (If you have a choice, reverse-video plus half-bright
is good, or reverse-video alone; however, different users have different
preferences on different terminals.) The sequences to enter and exit
standout mode are given as smso and rmso, respectively. If the code to
change into or out of standout mode leaves one or even two blank spaces on
the screen, as the TVI 912 and Teleray 1061 do, then xmc should be given
to tell how many spaces are left.
Codes to begin underlining and end underlining can be given as smul and
rmul, respectively. If the terminal has a code to underline the current
character and move the cursor one space to the right, such as the Micro-
Term MIME, this can be given as uc.
16 Intergraph Corporation - 2/94
terminfo(4) CLIX terminfo(4)
Other capabilities to enter various highlighting modes include:
blink Blinking
bold Bold or extra-bright
dim Dim or half-bright
invis Blanking or invisible text
prot Protected
rev Reverse-video
sgr0 Turn off all attribute modes
smacs Enter alternate-character-set mode
rmacs Exit alternate-character-set mode
Turning on any of these modes singly may or may not turn off other modes.
If a command is necessary before alternate character set mode is entered,
give the sequence in enacs (enable alternate-character-set mode).
If there is a sequence to set arbitrary combinations of modes, this should
be given as sgr (set attributes), taking nine parameters. Each parameter
is either 0 or nonzero, as the corresponding attribute is on or off. The
nine parameters are, in order: standout, underline, reverse, blink, dim,
bold, blank, protect, alternate character set. Not all modes need be
supported by sgr, only those for which corresponding separate attribute
commands exist. (See the example at the end of this section.)
Terminals with the ``magic cookie'' glitch (xmc) deposit special
``cookies'' when they receive mode-setting sequences, which affect the
display algorithm rather than having extra bits for each character. Some
terminals, such as the Hewlett-Packard 2621, automatically leave standout
mode when they move to a new line or the cursor is addressed. Programs
using the standout mode should exit standout mode before moving the cursor
or sending a newline, unless the msgr capability, asserting that it is
safe to move in standout mode, is present.
If the terminal has a way of flashing the screen to indicate an error
quietly (a bell replacement), then this can be given as flash; it must not
move the cursor. A good flash can be done by changing the screen into
reverse video, pad for 200 ms, then return the screen to normal video.
If the cursor needs to be made more visible than normal when it is not on
the bottom line (to make, for example, a nonblinking underline into an
easier to find block or blinking underline) gives this sequence as cvvis.
The boolean chts should also be given. If there is a way to make the
cursor completely invisible, give that as civis. The capability cnorm
2/94 - Intergraph Corporation 17
terminfo(4) CLIX terminfo(4)
should be given, which undoes the effects of either of these modes.
If the terminal needs to be in a special mode when running a program that
uses these capabilities, the codes to enter and exit this mode can be
given as smcup and rmcup. This arises, for example, from terminals like
the Concept with more than one page of memory. If the terminal has only
memory relative cursor addressing and not screen-relative cursor
addressing, a one screen-sized window must be fixed into the terminal for
cursor addressing to work properly. This is also used for the Tektronix
4025, where smcup sets the command character to be the one used by the
terminfo command.
If the smcup sequence will not restore the screen after an rmcup sequence
is output (to the state prior to outputting rmcup), specify nrrmc.
If your terminal generates underlined characters by using the underline
character (with no special codes needed), even though it does not
otherwise overstrike characters, the user should still input the ul
capability. For terminals where a character overstriking another leaves
both characters on the screen, give the capability os. If overstrikes are
erasable with a blank, then this should be indicated by giving eo.
Example of Highlighting:
Assume that the terminal under question needs the following escape
sequences to turn on various modes:
tparm Attribute Escape sequence
Parameter
None \E[0m
p1 Standout \E[0;4;7m
p2 Underline \E[0;3m
p3 Reverse \E[0;4m
p4 Blink \E[0;5m
p5 Dim \E[0;7m
p6 Bold \E[0;3;4m
p7 Invis \E[0;8m
p8 Protect not available
p9 altcharset ^O (off) ^N(on)
Note that each escape sequence requires a 0 to turn off other modes before
turning on its own mode. Also note that, as suggested above, standout is
set up to be the combination of reverse and dim. Also, since this
terminal has no bold mode, bold is set up as the combination of reverse
and underline. In addition, to allow combinations, such as
underline+blink, the sequence to use would be \E[0;3;5m. The terminal
doesn't have the protect mode, either, but that cannot be simulated in any
way, so p8 is ignored. The altcharset mode is different in that it is
either ^O or ^N depending on whether it is off or on. If all modes were
to be turned on, the sequence would be \E[0;3;4;5;7;8m^N. Note how
different sequences are output. For example, ;3 is output when either p2
18 Intergraph Corporation - 2/94
terminfo(4) CLIX terminfo(4)
or p6 is true, that is, if either underline or bold modes are turned on.
Writing out the above sequences, along with their dependencies, gives the
following:
Sequence When to output Terminfo Translation
\E[0 Always \E[0
;3 If p2 or p6 %?%p2%p6%|%t;3%;
;4 If p1 or p3 or p6 %?%p1%p3%|%p6%|%t;4%;
;5 If p4 %?%p4%t;5%;
;7 If p1 or p5 %?%p1%p5%|%t;7%;
;8 If p7 %?%p7%t;8%;
m Always m
^N or ^O if p9 ^N, else ^O %?%p9%t^N%e^O%;
Putting all of this together into the sgr sequence gives:
sgr=\E[0%?%p2%p6%|%t;3%;%?%p1%p3%|%p6%|%t;4%;%?%p5%t;5%;%?%p1%p5%
|%t;7%;%?%p7%t;8%;m%?%p9%t^N%e^O%;,
Keypad
If the terminal has a keypad that transmits codes when the keys are
pressed, this information can be given. Note that it is not possible to
handle terminals where the keypad only works in local (this applies, for
example, to unshifted Hewlett-Packard 2621 keys). If the keypad can be
set to transmit or not transmit, the following codes should be input: smkx
and rmkx. Otherwise, the keypad is assumed to always transmit.
The codes sent by the left arrow, right arrow, up arrow, down arrow, and
Home keys can be given as kcub1, kcuf1, kcuu1, kcud1, and khome,
respectively. If there are function keys such as <F0> through <F63>, the
codes they send can be given as kf0 through kf63. If the first 11 keys
have labels other than the default <F0> through <F10>, the labels can be
given as lf0 through lf10. The following codes transmitted by other
special keys can also be input:
kll Home down
kbs Backspace
ktbc Clear all tabs
kctab Clear the tab stop in this column
kclr Clear screen or erase key
kdch1 Delete character
kdl1 Delete line
2/94 - Intergraph Corporation 19
terminfo(4) CLIX terminfo(4)
krmir Exit insert mode
kel Clear to end of line
ked Clear to end of screen
kich1 Insert character or enter insert mode
kil1 Insert line
knp Next page
kpp Previous page
kind Scroll forward/down
kri Scroll backward/up
khts Sets a tab stop in this column
In addition, if the keypad has a 3 by 3 array of keys including the four
arrow keys, the other five keys would be input as:
ka1
ka3
kb2
kc1
kc3
These keys are useful when the effects of a 3 by 3 directional pad are
needed. Further keys are defined in the capabilities list.
Strings to program function keys are: pfkey, pfloc, and pfx. The pln
string can be used to program the soft-screen labels. Each of these
strings takes two parameters: the function key number to program (rom0 to
10) and the string to program it with. Function key numbers out of this
range may program undefined keys in a terminal-dependent manner. The
difference between the capabilities is as follows: The pfkey causes
pressing the given key to be the same as the user typing the given string;
pfloc causes the string to be executed by the terminal in local mode; and
pfx causes the string to be transmitted to the computer. The capabilities
nlab, lw and lh define how many soft labels there are and their width and
height. If there are commands to turn the labels on and off, give them in
smln and rmln. The smln attribute is normally output after one or more
pln sequences to make sure that the change becomes visible.
Tabs and Initialization
20 Intergraph Corporation - 2/94
terminfo(4) CLIX terminfo(4)
If the terminal has hardware tabs, the command to advance to the next tab
stop can be given as ht (usually the <Ctrl-I> sequence). A ``backtab''
command which moves left to the next tab stop can be given as cbt. By
convention, if the teletype modes indicate that tabs are being expanded by
the computer rather than being sent to the terminal, programs should not
use ht or cbt even if they are present, since the user may not have the
tab stops properly set. If the terminal has hardware tabs which are
initially set every n spaces when the terminal is powered up, the numeric
parameter it is given, showing the number of spaces the tabs are set to.
This is normally used by tput or init to determine whether to set the mode
for hardware tab expansion and whether to set the tab stops.
If the terminal has tab stops that can be saved in nonvolatile memory, the
terminfo description can assume that they are properly set. If there are
commands to set and tab stops to clear, they can be given as tbc (clear
all tab stops) and hts (sets a tab stop in the current column of every
row).
Initialization strings for the terminal include:
is1
is2
is3
iprog The pathname of a program to be run to initialize the terminal.
if The name of a file containing long initialization strings.
These strings are expected to set the terminal into modes consistent with
the rest of the terminfo description. They must be sent to the terminal
each time the user logs in, and must be output in the following order:
run the program (iprog); output (is1); output (is2); set the margins using
mgc, smgl and smgr; sets the tabs using tbc and hts; print the file if;
and finally output is3. This is usually done using the init option of the
tput(1) command. See profile(4).
Most initialization is done with is2. Special terminal modes can be set
up without duplicating strings by putting the common sequences in is2 and
special cases in is1 and is3. Sequences that do a harder reset from a
totally unknown state can be given as rs1, rs2, rf, and rs3, analogous to
is1, is2, is3, and if. (The method using files, if and rf, is used for a
few terminals, from /usr/lib/tabset/*; however, the recommended method is
to use the initialization and reset strings.) These strings are output by
tput reset, which is used when the terminal gets into a wedged state.
Commands are normally placed in rs1, rs2, rs3, and rf only if they produce
annoying effects on the screen and are not necessary when logging in. For
example, the command to set a terminal into 80-column mode would normally
be part of is2, but on some terminals it causes an annoying glitch on the
screen and is not normally needed, since the terminal is usually already
2/94 - Intergraph Corporation 21
terminfo(4) CLIX terminfo(4)
in 80-column mode.
If a more complex sequence is needed to set the tabs than can be described
by using tbc and hts, the sequence can be placed in is2 or if.
If there are commands to set and clear margins, they can be given as mgc
(clear all margins), smgl (set left margin), and smgr (set right margin).
Delays
Certain capabilities control padding in the tty(7) driver. These are
primarily needed by hard-copy terminals, and are used by tput init to set
tty modes appropriately. Delays embedded in the capabilities cr, ind,
cub1, ff, and tab can be used to set the appropriate delay bits to be set
in the tty driver. If pb (padding baud rate) is given, these values can
be ignored at baud rates below the value of pb.
Status Lines
If the terminal has an extra status line that is not normally used by
software, this fact can be indicated. If the status line is viewed as an
extra line below the bottom line, into which one can cursor address
normally (such as the Heathkit h19's 25th line, or the 24th line of a
VT100 which is set to a 23-line scrolling region), the capability hs
should be given. Special strings that go to a given column of the status
line and return from the status line can be given as tsl and fsl. (The
fsl must leave the cursor position in the same place it was before tsl.
If necessary, the sc and rc strings can be included in tsl and fsl to get
this effect.)
The capability tsl takes one parameter, which is the column number of the
status line the cursor is to be moved to.
If escape sequences and other special commands, such as tab, work while in
the status line, the flag eslok can be given. A string which turns off
the status line (or otherwise erases its contents) should be given as dsl.
If the terminal has commands to save and restore the position of the
cursor, give them as sc and rc. The status line is normally assumed to be
the same width as the rest of the screen, for example, cols. If the
status line is a different width (possibly because the terminal does not
allow an entire line to be loaded), the width, in columns, can be
indicated with the numeric parameter wsl.
Line Graphics
If the terminal has a line drawing alternate character set, the mapping of
glyph to the character would be given in acsc. The definition of this
string is based on the alternate character set used in the DEC VT100
terminal, extended slightly with some characters from the AT&T 4410v1
terminal.
22 Intergraph Corporation - 2/94
terminfo(4) CLIX terminfo(4)
Glyph Name vt100+
Character
Arrow pointing right +
Arrow pointing left ,
Arrow pointing down .
Solid square block 0
Lantern symbol I
Arrow pointing up -
Diamond `
Checker board (stipple) a
Degree symbol f
Plus/minus g
Board of squares h
Lower right corner j
Upper right corner k
Upper left corner l
Lower left corner m
Plus n
Scan line 1 o
Horizontal line q
Scan line 9 s
Left tee t
Right tee u
Bottom tee v
Top tee w
Vertical line x
Bullet ~
The best way to describe a new terminal's line graphics set is to add a
third column to the above table, with the characters for the new terminal
that produce the appropriate glyph when the terminal is in the alternate
character set mode. For example,
Glyph Name vt100+
char char
Upper left corner l R
Lower left corner m F
Upper right corner k T
Lower right corner j G
Horizontal line q ,
Vertical line x .
Now write down the characters left to right, as in acsc=lRmFkTjGq\,x..
Miscellaneous
If the terminal requires other than a null (zero) character as a pad, then
this can be given as pad. Only the first character of the pad string is
used. If the terminal does not have a pad character, specify npc.
2/94 - Intergraph Corporation 23
terminfo(4) CLIX terminfo(4)
If the terminal can move up or down half a line, this can be indicated
with hu (half-line up) and hd (half-line down). This is primarily useful
for superscripts and subscripts on hardcopy terminals. If a hardcopy
terminal can eject to the next page (formfeed), give this as ff, usually
<Ctrl-L>.
If there is a command to repeat a given character a given number of times
(to save time transmitting a large number of identical characters), this
can be indicated with the parameterized string rep. The first parameter
is the character to be repeated and the second is the number of times to
repeat it. Thus, tparm(repeat_char, 'x', 10) is the same as xxxxxxxxxx.
If the terminal has a settable command character, such as the Tektronix
4025, this can be indicated with cmdch. A prototype command character is
chosen which is used in all capabilities. This character is given in the
cmdch capability to identify it. The following convention is supported on
some UNIX systems: If the environment variable CC exists, all occurrences
of the prototype character are replaced with the character in CC.
Terminal descriptions that do not represent a specific kind of known
terminal, such as switch, dialup, patch, and network, should include the
gn (generic) capability so that programs can complain that they do not
know how to talk to the terminal.
(This capability does not apply to virtual terminal descriptions for which
the escape sequences are known.) If the terminal is one of those
supported by the UNIX system virtual terminal protocol, the terminal
number can be given as vt. A line-turn-around sequence to be transmitted
before doing reads should be specified in rfi.
If the terminal uses XON-XOFF handshaking for flow control, give xon.
Padding information should still be included so that functions can make
better decisions about costs, but actual pad characters will not be
transmitted. Sequences to turn on and off XON-XOFF handshaking may be
given in smxon and rmxon. If the characters used for handshaking are not
^S and ^Q, they may be specified with xonc and xoffc.
If the terminal has a ``meta key'' which acts as a shift key, setting the
8th bit of any character transmitted, this fact can be indicated with km.
Otherwise, software will assume that the 8th bit is parity and it will
usually be cleared. If strings exist to turn this ``meta mode'' on and
off, they can be given as smm and rmm.
If the terminal has more lines of memory than will fit on the screen at
once, the number of lines of memory can be indicated with lm. A value of
lm #0 indicates that the number of lines is not fixed, but that there is
still more memory than fits on the screen.
Media copy strings which control an auxiliary printer connected to the
terminal can be given as:
24 Intergraph Corporation - 2/94
terminfo(4) CLIX terminfo(4)
mc0 Prints the contents of the screen.
mc4 Turns off the printer.
mc5 Turns on the printer.
When the printer is on, all text sent to the terminal is sent to the
printer. A variation, mc5p, takes one parameter, and leaves the printer
on for as many characters as the value of the parameter, then turns the
printer off. This parameter should not exceed 255. If the text is not
displayed on the terminal screen when the printer is on, specify mc5i
(silent printer). All text, including mc4, is transparently passed to the
printer while an mc5p is in effect.
Special Cases
The working model used by terminfo fits most terminals reasonably well.
However, some terminals do not completely match that model, requiring
special support by the terminfo() command. These are not meant to be
construed as deficiencies in the terminals; they are just differences
between the working model and the actual hardware. They may be unusual
devices or, for some reason, do not have all the features of the terminfo
model implemented.
Terminals which can not display tilde (~) characters, such as certain
Hazeltine terminals, should indicate hz.
Terminals which ignore a linefeed immediately after an am wrap, such as
the Concept 100, should indicate xenl. Those terminals whose cursor
remains on the right-most column until another character has been
received, rather than wrapping immediately upon receiving the right-most
character, such as the VT100, should also indicate xenl.
If el is required to get rid of standout (instead of writing normal text
on top of it), xhp should be given.
Teleray terminals, whose tabs turn all characters moved over to blanks,
should indicate xt (destructive tabs). With this capability it is not
possible to position the cursor on top of a ``magic cookie;'' therefore,
to erase standout mode, it is instead necessary to use delete and insert
line.
For Beehive Superbee terminals which do not transmit the escape or <Ctrl-
C> characters, the user should specify xsb, indicating that the <F1> key
is to be used for escape, and the <F2> key is to be used for <Ctrl-C>.
Similar Terminals
If there are two very similar terminals, one can be defined as being just
like the other, but with certain exceptions. The string capability use
can be given with the name of the similar terminal. The capabilities
2/94 - Intergraph Corporation 25
terminfo(4) CLIX terminfo(4)
given before use override those in the terminal type invoked by use. A
capability can be canceled by placing xx@ to the left of the capability
definition, where xx is the capability. For example, the entry:
att4424-2|Teletype 4424 in display function group ii,
rev@, sgr@, smul@, use=att4424,
This entry defines an AT&T 4424 terminal that does not have the rev, sgr,
and smul capabilities, and hence cannot do highlighting. This is useful
for different modes for a terminal, or for different user preferences.
More than one use capability may be given.
EXAMPLES
Following is a sample entry for a vt100 terminal:
vt100|vt100-am|dec vt100 (w/advanced video),
am, mir, msgr, xenl, xon,
cols#80, it#8, lines#24, vt#3,
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>, civis=\E[1v,
clear=\E[H\E[J, cnorm=\E[v, cr=\r,
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\b,
cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C$<2>,
cup=\E[%i%p1%d;%p2%dH$<5>, cuu=\E[%p1%dA,
cuu1=\E[A$<2>, cvvis=\E[0v, ed=\E[J$<50>, el=\E[K$<3>,
el1=\E[1K$<3>, enacs=\E(B\E)0, home=\E[H, ht=\t,
hts=\EH, ind=\n, ka1=\EOq, ka3=\EOs, kb2=\EOr, kbs=\b,
kc1=\EOp, kc3=\EOn, kcub1=\EOD, kcud1=\EOB,
kcuf1=\EOC, kcuu1=\EOA, kent=\EOM, kf0=\EOy, kf1=\EOP,
kf10=\EOu, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOw,
kf6=\EOx, kf7=\EOy, kf8=\EOm, kf9=\EOt, rc=\E8,
rev=\E[7m$<2>, ri=\EM$<5>, rmacs=^O, rmkx=\E[?1l\E>,
rmso=\E[m$<2>, rmul=\E[m$<2>,
rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7,
sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t^N%e^O%;,
sgr0=\E[m^O$<2>, smacs=^N, smkx=\E[?1h\E=,
smso=\E[1;7m$<2>, smul=\E[4m$<2>, tbc=\E[3g,
FILES
/usr/lib/terminfo/?/* Compiled terminal description database.
/usr/lib/.COREterm/?/* Subset of compiled terminal description database.
/usr/lib/tabset/* Tab settings for some terminals, in a format
appropriate to be output to the terminal (escape
sequences that set margins and tabs).
NOTES
26 Intergraph Corporation - 2/94
terminfo(4) CLIX terminfo(4)
The termcap database (from earlier releases of UNIX System V) may not be
supplied in future releases.
CAUTIONS
As described in ``Tabs and Initialization,'' a terminal's initialization
strings , is1, is2, and is3, if defined, must be output before a curses(3)
program is run. An available mechanism for outputting such strings is
tput init (see tput(1) and profile(4)).
Tampering with entries in /usr/lib/.COREterm/?/* or /usr/lib/terminfo/?/*
(for example, changing or removing an entry) can affect programs such as
vi(1) that expect the entry to be present and correct. In particular,
removing the description for the ``dumb'' terminal will cause unexpected
problems.
RELATED INFORMATION
Functions: curses(3), printf(3), term(4).
Commands: captoinfo(1), infocmp(1), tic(1), tty(7), tput(1)
2/94 - Intergraph Corporation 27