HP-UX Reference (11i v2 03/08) - 4 File Formats (vol 8)

t
terminfo(4) terminfo(4)
(ENHANCED CURSES)
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 this all 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%;,
Remember that sgr and sgr0 must always be specified.
Keypad
If the device has a keypad that transmits sequences when the keys are pressed, this information can also
be specified. Note that it is not possible to handle devices where the keypad only works in local (this
applies, for example, to the unshifted Hewlett-Packard 2621 keys). If the keypad can be set to transmit
or not transmit, specify these sequences as smkx and rmkx. Otherwise the keypad is assumed to always
transmit.
The sequences 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, f1, ...,
f63, the sequences they send can be specified as kf0, kf1, ..., kf63. If the first 11 keys have labels
other than the default f0 through f10, the labels can be given as lf0, lf1, ..., lf10.
The codes transmitted by certain other special keys can be given: 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), 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 (set 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 can be given as ka1, ka3, kb2, kc1, and kc3. These keys are useful when the effects of a 3
by 3 directional pad are needed. Further keys are defined above in the capabilities list.
Strings to program function keys can be specified as pfkey, pfloc, and pfx. A string to program
screen labels should be specified as pln. Each of these strings takes two arguments: a function key
identifier and a string to program it with. 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 the
number of programmable screen labels and their width and height. If there are commands to turn the
labels on and off, give them in smln and rmln. smln is normally output after one or more pln
sequences to make sure that the change becomes visible.
Tabs and Initialization
If the device has hardware tabs, the command to advance to the next tab stop can be given as ht (usually
control-I). A "backtab" command that moves leftward to the next tab stop can be given as cbt. By con-
vention, if tty modes show that tabs are being expanded by the computer rather than being sent to the
device, programs should not use ht or cbt (even if they are present) because the user might not have
the tab stops properly set. If the device has hardware tabs that are initially set every n spaces when the
device is powered up, the numeric argument it is given, showing the number of spaces the tabs are set
to. This is normally used by tput init to determine whether to set the mode for hardware tab expan-
sion and whether to set the tab stops. If the device 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 clear tab stops, they can be given as tbc (clear all tab stops) and hts (set a tab stop in the current
column of every row).
Other capabilities include: is1, is2, and is3, initialization strings for the device; iprog, the path
name of a program to be run to initialize the device; and if, the name of a file containing long initializa-
tion strings. These strings are expected to set the device into modes consistent with the rest of the ter-
minfo description. They must be sent to the device each time the user logs in and be output in the fol-
lowing order: run the program iprog; output is1; output is2; set the margins using mgc, smgl and
Section 4330 Hewlett-Packard Company 19 HP-UX 11i Version 2: August 2003