HP-UX Reference (11i v3 07/02) - 4 File Formats (vol 8)

t
terminfo(4) terminfo(4)
(ENHANCED CURSES)
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 pro-
grammable 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 conven-
tion, 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 expansion and
whether to set the tab stops. If the device has tab stops that can be saved in nonvolatile memory, the ter-
minfo 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 initialization
strings. These strings are expected to set the device into modes consistent with the rest of the terminfo
description. They must be sent to the device each time the user logs in and be output in the following
order: run the program iprog; output is1; output is2; set the margins using mgc, smgl and smgr;
set the tabs using tbc and hts; print the file if; and finally output is3. This is usually done using the
init option of tput.
Most initialization is done with is2. Special device 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 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; 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 because the terminal is usually already 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.
Any margin can be cleared with mgc. (For instructions on how to specify commands to set and clear mar-
gins, see the Margins subsection of the Capabilities That Cause Movement section below.
Delays
Certain capabilities control padding in the tty driver. These are primarily needed by hard-copy terminals,
and are used by tput init to set tty modes appropriately (see tput(1)). Delays embedded in the capabili-
ties 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 nor-
mally (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.(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 argument, 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
506 Hewlett-Packard Company 22 HP-UX 11i Version 3: February 2007