Site Tools


This is an old revision of the document!


Special Terminal Capabilities

Capability Table

The following table describes all terminal capabilities that are recognized by screen and are not in the termcap(5) manual. You can place these capabilities in your termcap entries (in /etc/termcap) or use them with the commands termcap, terminfo, and termcapinfo in your screenrc files. It is often not possible to place these capabilities in the terminfo database.

LP (bool) Terminal as VT100 style margins (“magic margins”). Note that this capability is obsolete because screen uses the standard xn instead.
Z0 (str) Change width to 132 columns.
Z1 (str) Change width to 80 columns.
WS (str) Resize display. This capability has the desired width and height as arguments. SunView™ example: \E[8;%d;%dt.
NF (bool) Terminal doesn't need flow control. Send ^S and ^Q direct to the application. Same as flow off. The opposite of this capability is nx.
G0 (bool) Terminal can deal with ISO 2022 font selection sequences.
S0 (str) Switch charset G0 to the specified charset. Default is \E(%..
E0 (str) Switch charset G0 back to standard charset. Default is \E(B.
C0 (str) Use the string as a conversion table for font “0”. See the ac capability for more details.
CS (str) Switch cursor-keys to application mode.
CE (str) Switch cursor-keys back to normal mode.
AN (bool) Turn on autonuke. See the autonuke command for more details.
OL (num) Set the output buffer limit. See the obuflimit command for more details.
KJ (str) Set the encoding of the terminal. See the encoding command for valid encodings.
AF (str) Change character foreground color in an ANSI conformant way. This capability will almost always be set to \E[3%dm (\E[3%p1%dm on terminfo machines).
AB (str) Same as AF, but change background color.
AX (bool) Does understand ANSI set default fg/bg color (\E[39m / \E[49m).
XC (str) Describe a translation of characters to strings depending on the current font. More details follow in the next section.
XT (bool) Terminal understands special xterm sequences (OSC, mouse tracking).
C8 (bool) Terminal needs bold to display high-intensity colors (e.g. Eterm).
TF (bool) Add missing capabilities to the termcap/info entry. (Set by default).

Character Translation

Screen has a powerful mechanism to translate characters to arbitrary strings depending on the current font and terminal type. Use this feature if you want to work with a common standard character set (say ISO8851-latin1) even on terminals that scatter the more unusual characters over several national language font pages.

Syntax:

XC=<charset-mapping>{,,<charset-mapping>}
<charset-mapping> := <designator><template>{,<mapping>}
<mapping> := <char-to-be-mapped><template-arg>

The things in braces may be repeated any number of times.

A <charset-mapping> tells screen how to map characters in font <designator> ('B': ASCII, 'A': UK, 'K': german, etc.) to strings. Every <mapping> describes to what string a single character will be translated. A template mechanism is used, as most of the time the codes have a lot in common (for example strings to switch to and from another charset). Each occurrence of % in <template> gets substituted with the <template-arg> specified together with the character. If your strings are not similar at all, then use % as a template and place the full string in <template-arg>. A quoting mechanism was added to make it possible to use a real %. The \ character quotes the special characters \, %, and ,.

Here is an example:

termcap hp700 XC=B\E(K%\E(B,\304[,\326\\\\,\334]

This tells screen how to translate ISOlatin1 (charset 'B') upper case umlaut characters on a hp700 terminal that has a german charset. '\304' gets translated to '\E(K[\E(B' and so on. Note that this line gets parsed three times before the internal lookup table is built, therefore a lot of quoting is needed to create a single '\'. Another extension was added to allow more emulation: If a mapping translates the unquoted '%' char, it will be sent to the terminal whenever screen switches to the corresponding <designator>. In this special case the template is assumed to be just '%' because the charset switch sequence and the character mappings normally haven't much in common.

This example shows one use of the extension:

termcap xterm XC=K%,%\E(B,[\304,\\\\\326,]\334

Here, a part of the german ('K') charset is emulated on an xterm. If screen has to change to the 'K' charset, '\E(B' will be sent to the terminal, i.e. the ASCII charset is used instead. The template is just '%', so the mapping is straightforward: '[' to '\304', '\' to '\326', and ']' to '\334'.


User Tools