macro "pl" not recognized -- ignoring macro "ND" not recognized -- ignoring XTerm Control Sequences Edward Moy University of California, Berkeley

Revised by Stephen Gildea X Consortium (1994) Thomas Dickey XFree86 Project (1996-2006) invisible-island.net (2006-2015) updated for XTerm F (2015/04/12) ctlseqs(ms) manual page Table of Contents

Definitions

SUBc
The literal character c.
CANc
A single (required) character.
Ps
A single (usually optional) numeric parameter, composed of one of more digits.
Pm
A multiple numeric parameter composed of any number of single numeric parameters, separated by ; character(s). Individual values for the parameters are listed with Ps .
Pt
A text parameter composed of printable characters.

C1 (8-Bit) Control Characters

The xterm program recognizes both 8-bit and 7-bit control characters. It generates 7-bit controls (by default) or 8-bit if S8C1T is enabled. The following pairs of 7-bit and 8-bit control characters are equivalent:

\*(Es\*D
Index (IND is 0x84).
\*(Es\*E
Next Line (ENQ l is 0x85).
\*(Es\*H
Tab Set (HTS is 0x88).
\*(Es\*M
Reverse Index (RI is 0x8d).
\*(Es\*N
Single Shift Select of G2 Character Set (SUB 2 is 0x8e). This affects next character only.
\*(Es\*O
Single Shift Select of G3 Character Set (SUB 3 is 0x8f). This affects next character only.
\*(Es\*P
Device Control String (DCS is 0x90).
\*(Es\*V
Start of Guarded Area (SUB g is 0x96).
\*(Es\*W
End of Guarded Area (g is 0x97).
\*(Es\*(XX
Start of String (SUB S is 0x98).
\*(Es\*Z
Return Terminal ID (DECID is 0x9a). Obsolete form of CAN sc (DA).
\*(Es\*([[
Control Sequence Introducer (CAN s is 0x9b).
\*(Es\*(bS
String Terminator (SUB T is 0x9c).
\*(Es\*(]]
Operating System Command (s is 0x9d).
\*(Es\*^
Privacy Message (PM is 0x9e).
\*(Es\*_
Application Program Command (APC is 0x9f).

These control characters are used in the vtXXX emulation.

VT100 Mode

Most of these control sequences are standard VT102 control sequences, but there is support for later DEC VT terminals (i.e., VT220, VT320, VT420, VT510), as well as ISO 6429 and aixterm color controls. The only VT102 feature not supported is auto-repeat, since the only way X provides for this will affect all windows.

There are additional control sequences to provide xterm-dependent functions, such as the scrollbar or window size. Where the function is specified by DEC or ISO 6429, the code assigned to it is given in parentheses.

The escape codes to designate and invoke character sets are specified by ISO 2022 (see that document for a discussion of character sets).

Many of the features are optional; xterm can be configured and built without support for them.

$*

\*(Be
Bell (Ctrl-G).
\*(Bs
Backspace (Ctrl-H).
\*(Cr
Carriage Return (Ctrl-M).
\*(En
Return Terminal Status (Ctrl-E). Default response is an empty string, but may be overridden by a resource answerbackString.
\*(Ff
Form Feed or New Page (NP). Ctrl-L is treated the same as LF.
\*(Lf
Line Feed or New Line (NL). (LF is Ctrl-J).
\*(Si
Shift In (Ctrl-O) -> Switch to Standard Character Set. This invokes the G0 character set (the default).
\*(So
Shift Out (Ctrl-N) -> Switch to Alternate Character Set. This invokes the G1 character set.
\*(Sp
Space.
\*(Ta
Horizontal Tab (HT) (Ctrl-I).
\*(Vt
Vertical Tab (Ctrl-K). This is treated the same as LF.

$*

This excludes controls where s is part of a 7-bit equivalent to 8-bit C1 controls, ordered by the final character(s).

\*(Es\*(Sp\*F
7-bit controls (S7C1T).
\*(Es\*(Sp\*G
8-bit controls (S8C1T).
\*(Es\*(Sp\*L
Set ANSI conformance level 1 (dpANS X3.134.1).
\*(Es\*(Sp\*M
Set ANSI conformance level 2 (dpANS X3.134.1).
\*(Es\*(Sp\*N
Set ANSI conformance level 3 (dpANS X3.134.1).
\*(Es\*#\*3
DEC double-height line, top half (DECDHL).
\*(Es\*#\*4
DEC double-height line, bottom half (DECDHL).
\*(Es\*#\*5
DEC single-width line (DECSWL).
\*(Es\*#\*6
DEC double-width line (DECDWL).
\*(Es\*#\*8
DEC Screen Alignment Test (DECALN).
\*(Es\*%\*@
Select default character set. That is ISO 8859-1 (ISO 2022).
\*(Es\*%\*G
Select UTF-8 character set (ISO 2022).
\*(Es\*(((\*(Cc
Designate G0 Character Set (ISO 2022, VT100).
Final character CAN c for designating 94-character sets. In this list, 0, A and B apply to VT100 and up, the remainder to VT220 and up. The VT220 character sets, together with the Portuguese character set are activated by the National Replacement Character controls. The A is a special case, since it is also activated by the VT300-control for British Latin-1 separately from the National Replacement Character controls. CAN c = 0 -> DEC Special Character and Line Drawing Set.
CAN c = < -> DEC Supplementary (VT200).
CAN c = %5 -> DEC Supplementary Graphics (VT300).
CAN c = > -> DEC Technical (VT300).
CAN c = A -> United Kingdom (UK).
CAN c = B -> United States (USASCII).
CAN c = 4 -> Dutch.
CAN c = CAN or 5 -> Finnish.
CAN c = R or f -> French.
CAN c = Q or 9 -> French Canadian (VT200, VT300).
CAN c = K -> German.
CAN c = Y -> Italian.
CAN c = `, or 6 -> Norwegian/Danish.
CAN c = %6 -> Portuguese (VT300).
CAN c = Z -> Spanish.
CAN c = H or 7 -> Swedish.
CAN c = = -> Swiss.
\*(Es\*)\*(Cc
Designate G1 Character Set (ISO 2022, VT100).
The same character sets apply as for s(CAN c.
\*(Es\**\*(Cc
Designate G2 Character Set (ISO 2022, VT220).
The same character sets apply as for s(CAN c.
\*(Es\*+\*(Cc
Designate G3 Character Set (ISO 2022, VT220).
The same character sets apply as for s(CAN c.
\*(Es\*-\*(Cc
Designate G1 Character Set (VT300).
The same character sets apply as for s(CAN c.
\*(Es\*.\*(Cc
Designate G2 Character Set (VT300).
The same character sets apply as for s(CAN c.
\*(Es\*/\*(Cc
Designate G3 Character Set (VT300).
These work for 96-character sets only. CAN c = A -> ISO Latin-1 Supplemental.
\*(Es\*6
Back Index (DECBI), VT420 and up.
\*(Es\*7
Save Cursor (DECSC).
\*(Es\*8
Restore Cursor (DECRC).
\*(Es\*9
Forward Index (DECFI), VT420 and up.
\*(Es\*=
Application Keypad (DECKPAM).
\*(Es\*>
Normal Keypad (DECKPNM).
\*(Es\*F
Cursor to lower left corner of screen. This is enabled by the hpLowerleftBugCompat resource.
\*(Es\*c
Full Reset (RIS).
\*(Es\*l
Memory Lock (per HP terminals). Locks memory above the cursor.
\*(Es\*m
Memory Unlock (per HP terminals).
\*(Es\*n
Invoke the G2 Character Set as GL (LS2).
\*(Es\*o
Invoke the G3 Character Set as GL (LS3).
\*(Es\*|
Invoke the G3 Character Set as GR (LS3R).
\*(Es\*}
Invoke the G2 Character Set as GR (LS2R).
\*(Es\*(c~
Invoke the G1 Character Set as GR (LS1R).

$*

\*(AP\*(Pt\*s\*(ST
None. xterm implements no APC functions; Pt is ignored. Pt need not be printable characters.

$*

\*(Dc\*(Ps\*;\*(Ps\*|\*(Pt\*s\*(ST
User-Defined Keys (DECUDK). The first parameter: Ps = 0 -> Clear all UDK definitions before starting (default).
Ps = 1 -> Erase Below (default).

The second parameter: Ps = 0 <- Lock the keys (default).
Ps = 1 <- Do not lock.

The third parameter is a ';'-separated list of strings denoting the key-code separated by a '/' from the hex-encoded key value. The key codes correspond to the DEC function-key codes (e.g., F6=17).
\*(Dc\*$\*q\*(Pt\*s\*(ST
Request Status String (DECRQSS). The string following the "q" is one of the following: c"q    -> DECSCA
c"p    -> DECSCL
r        -> DECSTBM
cs        -> DECSLRM
m        -> SGR
SUB pq    -> DECSCUSR

xterm responds with DCS 1$rPtSUB T for valid requests, replacing the Pt with the corresponding CAN s string, or DCS 0$rPtSUB T for invalid requests.
\*(Dc\*+\*p\*(Pt\*s\*(ST
Set Termcap/Terminfo Data (xterm, experimental). The string following the "p" is a name to use for retrieving data from the terminal database. The data will be usmacro "ID" not recognized -- ignoring macro "DE" not recognized -- ignoring ed for the "tcap" keyboard configuration's function- and special-keys, as well as by the Request Termcap/Terminfo String control.
\*(Dc\*+\*q\*(Pt\*s\*(ST
Request Termcap/Terminfo String (xterm, experimental). The string following the "q" is a list of names encoded in hexadecimal (2 digits per character) separated by ; which correspond to termcap or terminfo key names.
Two special features are also recognized, which are not key names: Co for termcap colors (or colors for terminfo colors), and TN for termcap name (or name for terminfo name).
xterm responds with DCS 1+rPtSUB T for valid requests, adding to Pt an =, and the value of the corresponding string that xterm would send, or DCS 0+rPtSUB T for invalid requests. The strings are encoded in hexadecimal (2 digits per character).

$*

\*(Cs\*(Ps\*s\*@
Insert Ps (Blank) Character(s) (default = 1) (ICH).
\*(Cs\*(Ps\*s\*A
Cursor Up Ps Times (default = 1) (CUU).
\*(Cs\*(Ps\*s\*(cB
Cursor Down Ps Times (default = 1) (CUD).
\*(Cs\*(Ps\*s\*C
Cursor Forward Ps Times (default = 1) (CUF).
\*(Cs\*(Ps\*s\*D
Cursor Backward Ps Times (default = 1) (CUB).
\*(Cs\*(Ps\*s\*E
Cursor Next Line Ps Times (default = 1) (CNL).
\*(Cs\*(Ps\*s\*F
Cursor Preceding Line Ps Times (default = 1) (CPL).
\*(Cs\*(Ps\*s\*G
Cursor Character Absolute [column] (default = [row,1]) (CHA).
\*(Cs\*(Ps\*s\*;\*(Ps\*s\*H
Cursor Position [row;column] (default = [1,1]) (CUP).
\*(Cs\*(Ps\*s\*I
Cursor Forward Tabulation Ps tab stops (default = 1) (CHT).
\*(Cs\*(Ps\*s\*J
Erase in Display (ED). Ps = 0 -> Erase Below (default).
Ps = 1 -> Erase Above.
Ps = 2 -> Erase All.
Ps = 3 -> Erase Saved Lines (xterm).
\*(Cs\*?\*(Ps\*s\*J
Erase in Display (DECSED). Ps = 0 -> Selective Erase Below (default).
Ps = 1 -> Selective Erase Above.
Ps = 2 -> Selective Erase All.
\*(Cs\*(Ps\*s\*K
Erase in Line (EL). Ps = 0 -> Erase to Right (default).
Ps = 1 -> Erase to Left.
Ps = 2 -> Erase All.
\*(Cs\*?\*(Ps\*s\*K
Erase in Line (DECSEL). Ps = 0 -> Selective Erase to Right (default).
Ps = 1 -> Selective Erase to Left.
Ps = 2 -> Selective Erase All.
\*(Cs\*(Ps\*s\*L
Insert Ps Line(s) (default = 1) (IL).
\*(Cs\*(Ps\*s\*M
Delete Ps Line(s) (default = 1) (DL).
\*(Cs\*(Ps\*s\*P
Delete Ps Character(s) (default = 1) (DCH).
\*(Cs\*(Ps\*s\*S
Scroll up Ps lines (default = 1) (SU).
\*(Cs\*?\*(Pi\*;\*(Pa\*;\*(Pv\*s\*S
If configured to support either Sixel Graphics or ReGIS Graphics, xterm accepts a three-parameter control sequence, where Pi, Pa and Pv are the item, action and value. Pi = 1 -> item (color registers)
Pa = 1 -> read the number of color registers
Pa = 2 -> reset the number of color registers
Pa = 3 -> set the number of color registers to the value Pv

The control sequence returns a response using the same form: CAN s?Pi;Ps;PvSUB
where Ps is the status: Ps = 0 -> success
Ps = 3 -> failure
\*(Cs\*(Ps\*s\*T
Scroll down Ps lines (default = 1) (SD).
\*(Cs\*(Ps\*s\*;\*(Ps\*s\*;\*(Ps\*s\*;\*(Ps\*s\*;\*(Ps\*s\*T
Initiate highlight mouse tracking. Parameters are [func;startx;starty;firstrow;lastrow]. See the section Mouse Tracking.
\*(Cs\*>\*(Ps\*;\*(Ps\*s\*T
Reset one or more features of the title modes to the default value. Normally, "reset" disables the feature. It is possible to disable the ability to reset features by compiling a different default for the title modes into xterm. Ps = 0 -> Do not set window/icon labels using hexadecimal.
Ps = 1 -> Do not query window/icon labels using hexadecimal.
Ps = 2 -> Do not set window/icon labels using UTF-8.
Ps = 3 -> Do not query window/icon labels using UTF-8.
(See discussion of "Title Modes").
\*(Cs\*(Ps\*s\*(XX
Erase Ps Character(s) (default = 1) (ECH).
\*(Cs\*(Ps\*s\*Z
Cursor Backward Tabulation Ps tab stops (default = 1) (CBT).
\*(Cs\*(Pm\*s\*`
Character Position Absolute [column] (default = [row,1]) (HPA).
\*(Cs\*(Pm\*s\*a
Character Position Relative [columns] (default = [row,col+1]) (HPR).
\*(Cs\*(Ps\*s\*b
Repeat the preceding graphic character Ps times (REP).
\*(Cs\*(Ps\*s\*c
Send Device Attributes (Primary DA). Ps = 0 or omitted -> request attributes from terminal.
The response depends on the decTerminalID resource setting. -> CAN s?1;2c (``VT100 with Advanced Video Option'')
-> CAN s?1;0c (``VT101 with No Options'')
-> CAN s?6c (``VT102'')
-> CAN s?62;Psc (``VT220'')
-> CAN s?63;Psc (``VT320'')
-> CAN s?64;Psc (``VT420'')

The VT100-style response parameters do not mean anything by themselves. VT220 (and higher) parameters do, telling the host what features the terminal supports: Ps = 1 -> 132-columns.
Ps = 2 -> Printer.
Ps = 3 -> ReGIS graphics.
Ps = 4 -> Sixel graphics.
Ps = 6 -> Selective erase.
Ps = 8 -> User-defined keys.
Ps = 9 -> National Replacement Character sets.
Ps = 15 -> Technical characters.
Ps = 18 -> User windows.
Ps = 21 -> Horizontal scrolling.
Ps = 22 -> ANSI color, e.g., VT525.
Ps = 29 -> ANSI text locator (i.e., DEC Locator mode).
\*(Cs\*>\*(Ps\*s\*c
Send Device Attributes (Secondary DA). Ps = 0 or omitted -> request the terminal's identification code.
The response depends on the decTerminalID resource setting. It should apply only to VT220 and up, but xterm extends this to VT100. -> CAN s>Pp;Pv;Pcc

where Pp denotes the terminal type Pp = 0 -> ``VT100''.
Pp = 1 -> ``VT220''.
Pp = 2 -> ``VT240''.
Pp = 18 -> ``VT330''.
Pp = 19 -> ``VT340''.
Pp = 24 -> ``VT320''.
Pp = 41 -> ``VT420''.
Pp = 61 -> ``VT510''.
Pp = 64 -> ``VT520''.
Pp = 65 -> ``VT525''.

and Pv is the firmware version (for xterm, this was originally the XFree86 patch number, starting with 95). In a DEC terminal, Pc indicates the ROM cartridge registration number and is always zero.
\*(Cs\*(Pm\*s\*d
Line Position Absolute [row] (default = [1,column]) (VPA).
\*(Cs\*(Pm\*s\*e
Line Position Relative [rows] (default = [row+1,column]) (VPR).
\*(Cs\*(Ps\*s\*;\*(Ps\*s\*f
Horizontal and Vertical Position [row;column] (default = [1,1]) (HVP).
\*(Cs\*(Ps\*s\*g
Tab Clear (TBC). Ps = 0 -> Clear Current Column (default).
Ps = 3 -> Clear All.
\*(Cs\*(Pm\*s\*h
Set Mode (SM). Ps = 2 -> Keyboard Action Mode (AM).
Ps = 4 -> Insert Mode (IRM).
Ps = 12 -> Send/receive (SRM).
Ps = 20 -> Automatic Newline (LNM).
\*(Cs\*?\*(Pm\*s\*h
DEC Private Mode Set (DECSET). Ps = 1 -> Application Cursor Keys (DECCKM).
Ps = 2 -> Designate USASCII for character sets G0-G3 (DECANM),
and set VT100 mode. Ps = 3 -> 132 Column Mode (DECCOLM).
Ps = 4 -> Smooth (Slow) Scroll (DECSCLM).
Ps = 5 -> Reverse Video (DECSCNM).
Ps = 6 -> Origin Mode (DECOM).
Ps = 7 -> Wraparound Mode (DECAWM).
Ps = 8 -> Auto-repeat Keys (DECARM).
Ps = 9 -> Send Mouse X & Y on button press.
See the section Mouse Tracking. This is the X10 xterm mouse protocol. Ps = 10 -> Show toolbar (rxvt).
Ps = 12 -> Start Blinking Cursor (att610).
Ps = 18 -> Print form feed (DECPFF).
Ps = 19 -> Set print extent to full screen (DECPEX).
Ps = 25 -> Show Cursor (DECTCEM).
Ps = 30 -> Show scrollbar (rxvt).
Ps = 35 -> Enable font-shifting functions (rxvt).
Ps = 38 -> Enter Tektronix Mode (DECTEK).
Ps = 40 -> Allow 80 z<--> 132 Mode.
Ps = 41 -> more(1) fix (see curses resource).
Ps = 42 -> Enable National Replacement Character sets (DECNRCM).
Ps = 44 -> Turn On Margin Bell.
Ps = 45 -> Reverse-wraparound Mode.
Ps = 46 -> Start Logging.
This is normally disabled by a compile-time option. Ps = 47 -> Use Alternate Screen Buffer.
(This may be disabled by the titeInhibit resource). Ps = 66 -> Application keypad (DECNKM).
Ps = 67 -> Backarrow key sends backspace (DECBKM).
Ps = 69 -> Enable left and right margin mode (DECLRMM), VT420 and up.
Ps = 95 -> Do not clear screen when DECCOLM is set/reset (DECNCSM), VT510 and up.
Ps = 1000 -> Send Mouse X & Y on button press and release.
See the section Mouse Tracking. This is the X11 xterm mouse protocol. Ps = 1001 -> Use Hilite Mouse Tracking.
Ps = 1002 -> Use Cell Motion Mouse Tracking.
Ps = 1003 -> Use All Motion Mouse Tracking.
Ps = 1004 -> Send FocusIn/FocusOut events.
Ps = 1005 -> Enable UTF-8 Mouse Mode.
Ps = 1006 -> Enable SGR Mouse Mode.
Ps = 1007 -> Enable Alternate Scroll Mode.
Ps = 1010 -> Scroll to bottom on tty output (rxvt).
Ps = 1011 -> Scroll to bottom on key press (rxvt).
Ps = 1015 -> Enable urxvt Mouse Mode.
Ps = 1034 -> Interpret "meta" key, sets eighth bit.
(enables the eightBitInput resource). Ps = 1035 -> Enable special modifiers for Alt and NumLock keys.
(This enables the numLock resource). Ps = 1036 -> Send s when Meta modifies a key.
(This enables the metaSendsEscape resource). Ps = 1037 -> Send DEL from the editing-keypad Delete key.
Ps = 1039 -> Send s when Alt modifies a key.
(This enables the altSendsEscape resource). Ps = 1040 -> Keep selection even if not highlighted.
(This enables the keepSelection resource). Ps = 1041 -> Use the CLIPBOARD selection.
(This enables the selectToClipboard resource). Ps = 1042 -> Enable Urgency window manager hint when Control-G is received.
(This enables the bellIsUrgent resource). Ps = 1043 -> Enable raising of the window when Control-G is received.
(enables the popOnBell resource). Ps = 1047 -> Use Alternate Screen Buffer. (This may be
disabled by the titeInhibit resource). Ps = 1048 -> Save cursor as in DECSC. (This may be
disabled by the titeInhibit resource). Ps = 1049 -> Save cursor as in DECSC
and use Alternate Screen Buffer, clearing it first. (This may be disabled by the titeInhibit resource). This combines the effects of the 1047 and 1048 modes. Use this with terminfo-based applications rather than the 47 mode. Ps = 1050 -> Set terminfo/termcap function-key mode.
Ps = 1051 -> Set Sun function-key mode.
Ps = 1052 -> Set HP function-key mode.
Ps = 1053 -> Set SCO function-key mode.
Ps = 1060 -> Set legacy keyboard emulation (X11R6).
Ps = 1061 -> Set VT220 keyboard emulation.
Ps = 2004 -> Set bracketed paste mode.
\*(Cs\*(Pm\*s\*i
Media Copy (MC). Ps = 0 -> Print screen (default).
Ps = 4 -> Turn off printer controller mode.
Ps = 5 -> Turn on printer controller mode.
\*(Cs\*?\*(Pm\*s\*i
Media Copy (MC, DEC-specific). Ps = 1 -> Print line containing cursor.
Ps = 4 -> Turn off autoprint mode.
Ps = 5 -> Turn on autoprint mode.
Ps = 1 0 -> Print composed display, ignores DECPEX.
Ps = 1 1 -> Print all pages.
\*(Cs\*(Pm\*s\*l
Reset Mode (RM). Ps = 2 -> Keyboard Action Mode (AM).
Ps = 4 -> Replace Mode (IRM).
Ps = 12 -> Send/receive (SRM).
Ps = 20 -> Normal Linefeed (LNM).
\*(Cs\*?\*(Pm\*s\*l
DEC Private Mode Reset (DECRST). Ps = 1 -> Normal Cursor Keys (DECCKM).
Ps = 2 -> Designate VT52 mode (DECANM).
Ps = 3 -> 80 Column Mode (DECCOLM).
Ps = 4 -> Jump (Fast) Scroll (DECSCLM).
Ps = 5 -> Normal Video (DECSCNM).
Ps = 6 -> Normal Cursor Mode (DECOM).
Ps = 7 -> No Wraparound Mode (DECAWM).
Ps = 8 -> No Auto-repeat Keys (DECARM).
Ps = 9 -> Don't send Mouse X & Y on button press.
Ps = 10 -> Hide toolbar (rxvt).
Ps = 12 -> Stop Blinking Cursor (att610).
Ps = 18 -> Don't print form feed (DECPFF).
Ps = 19 -> Limit print to scrolling region (DECPEX).
Ps = 25 -> Hide Cursor (DECTCEM).
Ps = 30 -> Don't show scrollbar (rxvt).
Ps = 35 -> Disable font-shifting functions (rxvt).
Ps = 40 -> Disallow 80 z<--> 132 Mode.
Ps = 41 -> No more(1) fix (see curses resource).
Ps = 42 -> Disable National Replacement Character sets (DECNRCM).
Ps = 44 -> Turn Off Margin Bell.
Ps = 45 -> No Reverse-wraparound Mode.
Ps = 46 -> Stop Logging.
(This is normally disabled by a compile-time option). Ps = 47 -> Use Normal Screen Buffer.
Ps = 66 -> Numeric keypad (DECNKM).
Ps = 67 -> Backarrow key sends delete (DECBKM).
Ps = 69 -> Disable left and right margin mode (DECLRMM), VT420 and up.
Ps = 95 -> Clear screen when DECCOLM is set/reset (DECNCSM), VT510 and up.
Ps = 1000 -> Don't send Mouse X & Y on button press and
release. See the section Mouse Tracking. Ps = 1001 -> Don't use Hilite Mouse Tracking.
Ps = 1002 -> Don't use Cell Motion Mouse Tracking.
Ps = 1003 -> Don't use All Motion Mouse Tracking.
Ps = 1004 -> Don't send FocusIn/FocusOut events.
Ps = 1005 -> Disable UTF-8 Mouse Mode.
Ps = 1006 -> Disable SGR Mouse Mode.
Ps = 1007 -> Disable Alternate Scroll Mode.
Ps = 1010 -> Don't scroll to bottom on tty output (rxvt).
Ps = 1011 -> Don't scroll to bottom on key press (rxvt).
Ps = 1015 -> Disable urxvt Mouse Mode.
Ps = 1034 -> Don't interpret "meta" key.
(This disables the eightBitInput resource). Ps = 1035 -> Disable special modifiers for Alt and NumLock keys.
(This disables the numLock resource). Ps = 1036 -> Don't send s when Meta modifies a key.
(This disables the metaSendsEscape resource). Ps = 1037 -> Send VT220 Remove from the editing-keypad Delete key.
Ps = 1039 -> Don't send s when Alt modifies a key.
(This disables the altSendsEscape resource). Ps = 1040 -> Do not keep selection when not highlighted.
(This disables the keepSelection resource). Ps = 1041 -> Use the PRIMARY selection.
(This disables the selectToClipboard resource). Ps = 1042 -> Disable Urgency window manager hint when Control-G is received.
(This disables the bellIsUrgent resource). Ps = 1043 -> Disable raising of the window when Control-G is received.
(This disables the popOnBell resource). Ps = 1047 -> Use Normal Screen Buffer, clearing screen
first if in the Alternate Screen. (This may be disabled by the titeInhibit resource). Ps = 1048 -> Restore cursor as in DECRC. (This may be
disabled by the titeInhibit resource). Ps = 1049 -> Use Normal Screen Buffer and restore cursor
as in DECRC. (This may be disabled by the titeInhibit resource). This combines the effects of the 1047 and 1048 modes. Use this with terminfo-based applications rather than the 47 mode. Ps = 1050 -> Reset terminfo/termcap function-key mode.
Ps = 1051 -> Reset Sun function-key mode.
Ps = 1052 -> Reset HP function-key mode.
Ps = 1053 -> Reset SCO function-key mode.
Ps = 1060 -> Reset legacy keyboard emulation (X11R6).
Ps = 1061 -> Reset keyboard emulation to Sun/PC style.
Ps = 2004 -> Reset bracketed paste mode.
\*(Cs\*(Pm\*s\*m
Character Attributes (SGR). Ps = 0 -> Normal (default).
Ps = 1 -> Bold.
Ps = 2 -> Faint, decreased intensity (ISO 6429).
Ps = 3 -> Italicized (ISO 6429).
Ps = 4 -> Underlined.
Ps = 5 -> Blink (appears as Bold).
Ps = 7 -> Inverse.
Ps = 8 -> Invisible, i.e., hidden (VT300).
Ps = 9 -> Crossed-out characters (ISO 6429).
Ps = 21 -> Doubly-underlined (ISO 6429).
Ps = 22 -> Normal (neither bold nor faint).
Ps = 23 -> Not italicized (ISO 6429).
Ps = 24 -> Not underlined.
Ps = 25 -> Steady (not blinking).
Ps = 27 -> Positive (not inverse).
Ps = 28 -> Visible, i.e., not hidden (VT300).
Ps = 29 -> Not crossed-out (ISO 6429).
Ps = 30 -> Set foreground color to Black.
Ps = 31 -> Set foreground color to Red.
Ps = 32 -> Set foreground color to Green.
Ps = 33 -> Set foreground color to Yellow.
Ps = 34 -> Set foreground color to Blue.
Ps = 35 -> Set foreground color to Magenta.
Ps = 36 -> Set foreground color to Cyan.
Ps = 37 -> Set foreground color to White.
Ps = 39 -> Set foreground color to default (original).
Ps = 40 -> Set background color to Black.
Ps = 41 -> Set background color to Red.
Ps = 42 -> Set background color to Green.
Ps = 43 -> Set background color to Yellow.
Ps = 44 -> Set background color to Blue.
Ps = 45 -> Set background color to Magenta.
Ps = 46 -> Set background color to Cyan.
Ps = 47 -> Set background color to White.
Ps = 49 -> Set background color to default (original).

If 16-color support is compiled, the following apply. Assume that xterm's resources are set so that the ISO color codes are the first 8 of a set of 16. Then the aixterm colors are the bright versions of the ISO colors: Ps = 90 -> Set foreground color to Black.
Ps = 91 -> Set foreground color to Red.
Ps = 92 -> Set foreground color to Green.
Ps = 93 -> Set foreground color to Yellow.
Ps = 94 -> Set foreground color to Blue.
Ps = 95 -> Set foreground color to Magenta.
Ps = 96 -> Set foreground color to Cyan.
Ps = 97 -> Set foreground color to White.
Ps = 100 -> Set background color to Black.
Ps = 101 -> Set background color to Red.
Ps = 102 -> Set background color to Green.
Ps = 103 -> Set background color to Yellow.
Ps = 104 -> Set background color to Blue.
Ps = 105 -> Set background color to Magenta.
Ps = 106 -> Set background color to Cyan.
Ps = 107 -> Set background color to White.

If xterm is compiled with the 16-color support disabled, it supports the following, from rxvt: Ps = 100 -> Set foreground and background color to default.

Xterm maintains a color palette whose entries are identified by an index beginning with zero. If 88- or 256-color support is compiled, the following apply:

·
  • All parameters are decimal integers.
  • ·
  • RGB values range from zero (0) to 255.
  • ·
  • ISO-8613-3 can be interpreted in more than one way; xterm allows the semicolons in this control to be replaced by colons (but after the first colon, colons must be used).
  • These ISO-8613-3 controls are supported: Ps = 38;2;Pr;Pg;Pb -> Set foreground color to the closest match in xterm's palette for the given RGB Pr/Pg/Pb.
    Ps = 38;5;Ps -> Set foreground color to the second Ps.
    Ps = 48;2;Pr;Pg;Pb -> Set background color to the closest match in xterm's palette for the given RGB Pr/Pg/Pb.
    Ps = 48;5;Ps -> Set background color to the second Ps.

    \*(Cs\*>\*(Ps\*;\*(Ps\*s\*m
    Set or reset resource-values used by xterm to decide whether to construct escape sequences holding information about the modifiers pressed with a given key. The first parameter identifies the resource to set/reset. The second parameter is the value to assign to the resource. If the second parameter is omitted, the resource is reset to its initial value. Ps = 0 -> modifyKeyboard.
    Ps = 1 -> modifyCursorKeys.
    Ps = 2 -> modifyFunctionKeys.
    Ps = 4 -> modifyOtherKeys.

    If no parameters are given, all resources are reset to their initial values.
    \*(Cs\*(Ps\*s\*n
    Device Status Report (DSR). Ps = 5 -> Status Report.

    Result (``OK'') is CAN s0n Ps = 6 -> Report Cursor Position (CPR) [row;column].

    Result is CAN sIr;IcR

    Note: it is possible for this sequence to be sent by a function key. For example, with the default keyboard configuration the shifted F1 key may send (with shift-, control-, alt-modifiers)
    CAN s1;2R, or
    CAN s1;5R, or
    CAN s1;6R, etc.

    The second parameter encodes the modifiers; values range from 2 to 16. See the section PC-Style Function Keys for the codes. The modifyFunctionKeys and modifyKeyboard resources can change the form of the string sent from the modified F1 key.

    \*(Cs\*>\*(Ps\*s\*n
    Disable modifiers which may be enabled via the CAN s>Ps;Psm sequence. This corresponds to a resource value of "-1", which cannot be set with the other sequence. The parameter identifies the resource to be disabled: Ps = 0 -> modifyKeyboard.
    Ps = 1 -> modifyCursorKeys.
    Ps = 2 -> modifyFunctionKeys.
    Ps = 4 -> modifyOtherKeys.

    If the parameter is omitted, modifyFunctionKeys is disabled. When modifyFunctionKeys is disabled, xterm uses the modifier keys to make an extended sequence of functions rather than adding a parameter to each function key to denote the modifiers.
    \*(Cs\*?\*(Ps\*s\*n
    Device Status Report (DSR, DEC-specific). Ps = 6 -> Report Cursor Position (DECXCPR) [row;column] as
    CAN s?Ir;IcR (assumes the default page, i.e., "1"). Ps = 15 -> Report Printer status as
    CAN s?10n (ready). or CAN s?11n (not ready). Ps = 25 -> Report UDK status as
    CAN s?20n (unlocked) or CAN s?21n (locked). Ps = 26 -> Report Keyboard status as

    CAN s?27;1;0;0n (North American).
    The last two parameters apply to VT400 & up, and denote keyboard ready and LK01 respectively. Ps = 53 -> Report Locator status as
    CAN s?53n Locator available, if compiled-in, or CAN s?50n No Locator, if not. Ps = 55 -> Report Locator status as
    CAN s?53n Locator available, if compiled-in, or CAN s?50n No Locator, if not. Ps = 56 -> Report Locator type as
    CAN s?57;1n Mouse, if compiled-in, or CAN s?57;0n Cannot identify, if not. Ps = 62 -> Report macro space (DECMSR) as
    CAN sPn\*{ Ps = 63 -> Report memory checksum (DECCKSR) as
    DCS Pt!xxxxSUB T
    Pt is the request id (from an optional parameter to the request).
    The x's are hexadecimal digits 0-9 and A-F.
    Ps = 75 -> Report data integrity as
    CAN s?70n (ready, no errors) Ps = 85 -> Report multi-session configuration as
    CAN s?83n (not configured for multiple-session operation).
    \*(Cs\*>\*(Ps\*s\*p
    Set resource value pointerMode. This is used by xterm to decide whether to hide the pointer cursor as the user types. Valid values for the parameter: Ps = 0 -> never hide the pointer.
    Ps = 1 -> hide if the mouse tracking mode is not enabled.
    Ps = 2 -> always hide the pointer, except when leaving the window.
    Ps = 3 -> always hide the pointer, even if leaving/entering the window.
    If no parameter is given, xterm uses the default, which is 1.
    \*(Cs\*!\*p
    Soft terminal reset (DECSTR).
    \*(Cs\*(Ps\*s\*$\*p

    Request ANSI mode (DECRQM). For VT300 and up, reply is
    CAN sPs;Pm$y

    where Ps is the mode number as in RM, and Pm is the mode value:
    0 - not recognized
    1 - set
    2 - reset
    3 - permanently set
    4 - permanently reset
    \*(Cs\*?\*(Ps\*$\*p
    Request DEC private mode (DECRQM). For VT300 and up, reply is
    CAN s?Ps;Pm$y

    where Ps is the mode number as in DECSET, Pm is the mode value as in the ANSI DECRQM.
    \*(Cs\*(Ps\*s\*;\*(Ps\*s\*(c"\*p
    Set conformance level (DECSCL). Valid values for the first parameter: Ps = 61 -> VT100.
    Ps = 62 -> VT200.
    Ps = 63 -> VT300.

    Valid values for the second parameter: Ps = 0 -> 8-bit controls.
    Ps = 1 -> 7-bit controls (always set for VT100).
    Ps = 2 -> 8-bit controls.
    \*(Cs\*(Ps\*s\*q
    Load LEDs (DECLL). Ps = 0 -> Clear all LEDS (default).
    Ps = 1 -> Light Num Lock.
    Ps = 2 -> Light Caps Lock.
    Ps = 3 -> Light Scroll Lock.
    Ps = 2 1 -> Extinguish Num Lock.
    Ps = 2 2 -> Extinguish Caps Lock.
    Ps = 2 3 -> Extinguish Scroll Lock.
    \*(Cs\*(Ps\*s\*(Sp\*q
    Set cursor style (DECSCUSR, VT520). Ps = 0 -> blinking block.
    Ps = 1 -> blinking block (default).
    Ps = 2 -> steady block.
    Ps = 3 -> blinking underline.
    Ps = 4 -> steady underline.
    Ps = 5 -> blinking bar (xterm).
    Ps = 6 -> steady bar (xterm).
    \*(Cs\*(Ps\*s\*(c"\*q
    Select character protection attribute (DECSCA). Valid values for the parameter: Ps = 0 -> DECSED and DECSEL can erase (default).
    Ps = 1 -> DECSED and DECSEL cannot erase.
    Ps = 2 -> DECSED and DECSEL can erase.
    \*(Cs\*(Ps\*s\*;\*(Ps\*s\*r
    Set Scrolling Region [top;bottom] (default = full size of window) (DECSTBM).
    \*(Cs\*?\*(Pm\*s\*r
    Restore DEC Private Mode Values. The value of Ps previously saved is restored. Ps values are the same as for DECSET.
    \*(Cs\*(Pt\*;\*(Pl\*;\*(Pb\*;\*(Pr\*;\*(Ps\*$\*r
    Change Attributes in Rectangular Area (DECCARA), VT400 and up. Pt;Pl;Pb;Pr denotes the rectangle.
    Ps denotes the SGR attributes to change: 0, 1, 4, 5, 7.
    \*(Cs\*s\*(Pl\*s\*;\*(Pr\*s\*(cs
    Set left and right margins (DECSLRM), available only when DECLRMM is enabled (VT420 and up).
    \*(Cs\*(cs
    Save cursor (ANSI.SYS), available only when DECLRMM is disabled.
    \*(Cs\*?\*(Pm\*s\*(cs
    Save DEC Private Mode Values. Ps values are the same as for DECSET.
    \*(Cs\*(Ps\*s\*;\*(Ps\*s\*;\*(Ps\*s\*t
    Window manipulation (from dtterm, as well as extensions). These controls may be disabled using the allowWindowOps resource. Valid values for the first (and any additional parameters) are: Ps = 1 -> De-iconify window.
    Ps = 2 -> Iconify window.
    Ps = 3;x;y -> Move window to [x, y].
    Ps = 4;height;width -> Resize the xterm window to given height and width in pixels.
    Omitted parameters reuse the current height or width. Zero parameters use the display's height or width. Ps = 5 -> Raise the xterm window to the front of the stacking order.
    Ps = 6 -> Lower the xterm window to the bottom of the stacking order.
    Ps = 7 -> Refresh the xterm window.
    Ps = 8;height;width -> Resize the text area to given height and width in characters.
    Omitted parameters reuse the current height or width. Zero parameters use the display's height or width. Ps = 9;0 -> Restore maximized window.
    Ps = 9;1 -> Maximize window (i.e., resize to screen size).
    Ps = 9;2 -> Maximize window vertically.
    Ps = 9;3 -> Maximize window horizontally.
    Ps = 10;0 -> Undo full-screen mode.
    Ps = 10;1 -> Change to full-screen.
    Ps = 10;2 -> Toggle full-screen.
    Ps = 11 -> Report xterm window state.
    If the xterm window is open (non-iconified), it returns CAN s1t. If the xterm window is iconified, it returns CAN s2t. Ps = 13 -> Report xterm window position.

    Result is CAN s3;Ix;Iyt Ps = 14 -> Report xterm window in pixels.

    Result is CAN s4;height;widtht Ps = 18 -> Report the size of the text area in characters.

    Result is CAN s8;height;widtht Ps = 19 -> Report the size of the screen in characters.

    Result is CAN s9;height;widtht Ps = 20 -> Report xterm window's icon label.

    Result is slabelSUB T Ps = 21 -> Report xterm window's title.

    Result is sllabelSUB T Ps = 22;0 -> Save xterm icon and window title on stack.
    Ps = 22;1 -> Save xterm icon title on stack.
    Ps = 22;2 -> Save xterm window title on stack.
    Ps = 23;0 -> Restore xterm icon and window title from stack.
    Ps = 23;1 -> Restore xterm icon title from stack.
    Ps = 23;2 -> Restore xterm window title from stack.
    Ps >= 24 -> Resize to Ps lines (DECSLPP).
    \*(Cs\*(Pt\*;\*(Pl\*;\*(Pb\*;\*(Pr\*;\*(Ps\*$\*t
    Reverse Attributes in Rectangular Area (DECRARA), VT400 and up. Pt;Pl;Pb;Pr denotes the rectangle.
    Ps denotes the attributes to reverse, i.e., 1, 4, 5, 7.
    \*(Cs\*>\*(Ps\*;\*(Ps\*s\*t
    Set one or more features of the title modes. Each parameter enables a single feature. Ps = 0 -> Set window/icon labels using hexadecimal.
    Ps = 1 -> Query window/icon labels using hexadecimal.
    Ps = 2 -> Set window/icon labels using UTF-8.
    Ps = 3 -> Query window/icon labels using UTF-8.
    (See discussion of "Title Modes")
    \*(Cs\*(Ps\*s\*(Sp\*t
    Set warning-bell volume (DECSWBV, VT520). Ps = 0 or 1 -> off.
    Ps = 2, 3 or 4 -> low.
    Ps = 5, 6, 7, or 8 -> high.
    \*(Cs\*u
    Restore cursor (ANSI.SYS).
    \*(Cs\*(Ps\*s\*(Sp\*u
    Set margin-bell volume (DECSMBV, VT520). Ps = 1 -> off.
    Ps = 2, 3 or 4 -> low.
    Ps = 0, 5, 6, 7, or 8 -> high.
    \*(Cs\*(Pt\*;\*(Pl\*;\*(Pb\*;\*(Pr\*;\*(Pp\*;\*(Pt\*;\*(Pl\*;\*(Pp\*$\*v
    Copy Rectangular Area (DECCRA, VT400 and up). Pt;Pl;Pb;Pr denotes the rectangle.
    Pp denotes the source page.
    Pt;Pl denotes the target location.
    Pp denotes the target page.
    \*(Cs\*(Pt\*s\*;\*(Pl\*s\*;\*(Pb\*s\*;\*(Pr\*s\*(qu\*w
    Enable Filter Rectangle (DECEFR), VT420 and up.
    Parameters are [top;left;bottom;right].
    Defines the coordinates of a filter rectangle and activates it. Anytime the locator is detected outside of the filter rectangle, an outside rectangle event is generated and the rectangle is disabled. Filter rectangles are always treated as "one-shot" events. Any parameters that are omitted default to the current locator position. If all parameters are omitted, any locator motion will be reported. DECELR always cancels any prevous rectangle definition.
    \*(Cs\*(Ps\*s\*x
    Request Terminal Parameters (DECREQTPARM).
    if Ps is a "0" (default) or "1", and xterm is emulating VT100, the control sequence elicits a response of the same form whose parameters describe the terminal: Ps -> the given Ps incremented by 2.
    Pn = 1 <- no parity.
    Pn = 1 <- eight bits.
    Pn = 1 <- 2 8 transmit 38.4k baud.
    Pn = 1 <- 2 8 receive 38.4k baud.
    Pn = 1 <- clock multiplier.
    Pn = 0 <- STP flags.
    \*(Cs\*(Ps\*s\**\*x
    Select Attribute Change Extent (DECSACE). Ps = 0 -> from start to end position, wrapped.
    Ps = 1 -> from start to end position, wrapped.
    Ps = 2 -> rectangle (exact).
    \*(Cs\*(Pi\*s\*;\*(Pg\*s\*;\*(Pt\*;\*(Pl\*;\*(Pb\*;\*(Pr\*s\**\*y
    Request Checksum of Rectangular Area (DECRQCRA), VT420 and up. Response is
    DCS Pi!xxxxSUB T
    Pi is the request id.
    Pg is the page number.
    Pt;Pl;Pb;Pr denotes the rectangle.
    The x's are hexadecimal digits 0-9 and A-F.
    \*(Cs\*(Pc\*s\*;\*(Pt\*s\*;\*(Pl\*s\*;\*(Pb\*s\*;\*(Pr\*s\*$\*x
    Fill Rectangular Area (DECFRA), VT420 and up. Pc is the character to use.
    Pt;Pl;Pb;Pr denotes the rectangle.
    \*(Cs\*(Ps\*s\*;\*(Pu\*s\*(qu\*z
    Enable Locator Reporting (DECELR).
    Valid values for the first parameter: Ps = 0 -> Locator disabled (default).
    Ps = 1 -> Locator enabled.
    Ps = 2 -> Locator enabled for one report, then disabled.

    The second parameter specifies the coordinate unit for locator reports.
    Valid values for the second parameter: Pu = 0 <- or omitted -> default to character cells.
    Pu = 1 <- device physical pixels.
    Pu = 2 <- character cells.
    \*(Cs\*(Pt\*;\*(Pl\*;\*(Pb\*;\*(Pr\*$\*z
    Erase Rectangular Area (DECERA), VT400 and up. Pt;Pl;Pb;Pr denotes the rectangle.
    \*(Cs\*(Pm\*s\*(qu\*{
    Select Locator Events (DECSLE).
    Valid values for the first (and any additional parameters) are: Ps = 0 -> only respond to explicit host requests (DECRQLP).
    (This is default). It also cancels any filter
    rectangle.
    Ps = 1 -> report button down transitions.
    Ps = 2 -> do not report button down transitions.
    Ps = 3 -> report button up transitions.
    Ps = 4 -> do not report button up transitions.
    \*(Cs\*(Pt\*;\*(Pl\*;\*(Pb\*;\*(Pr\*s\*$\*{
    Selective Erase Rectangular Area (DECSERA), VT400 and up. Pt;Pl;Pb;Pr denotes the rectangle.
    \*(Cs\*(Ps\*s\*(qu\*|
    Request Locator Position (DECRQLP).
    Valid values for the parameter are: Ps = 0, 1 or omitted -> transmit a single DECLRP locator report.

    If Locator Reporting has been enabled by a DECELR, xterm will respond with a DECLRP Locator Report. This report is also generated on button up and down events if they have been enabled with a DECSLE, or when the locator is detected outside of a filter rectangle, if filter rectangles have been enabled wmacro "in" not recognized -- ignoring ith a DECEFR.

    -> CAN sPe;Pb;Pr;Pc;Pp&w

    Parameters are [event;button;row;column;page].
    Valid values for the event: Pe = 0 -> locator unavailable - no other parameters sent.
    Pe = 1 -> request - xterm received a DECRQLP.
    Pe = 2 -> left button down.
    Pe = 3 -> left button up.
    Pe = 4 -> middle button down.
    Pe = 5 -> middle button up.
    Pe = 6 -> right button down.
    Pe = 7 -> right button up.
    Pe = 8 -> M4 button down.
    Pe = 9 -> M4 button up.
    Pe = 10 -> locator outside filter rectangle.

    The ``button'' parameter is a bitmask indicating which buttons are pressed: Pb = 0 <- no buttons down.
    Pb & 1 <- right button down.
    Pb & 2 <- middle button down.
    Pb & 4 <- left button down.
    Pb & 8 <- M4 button down.

    The ``row'' and ``column'' parameters are the coordinates of the locator position in the xterm window, encoded as ASCII decimal.
    The ``page'' parameter is not used by xterm.

    \*(Cs\*(Pm\*s\*(qu\*}
    Insert Ps Column(s) (default = 1) (DECIC), VT420 and up.
    \*(Cs\*(Pm\*s\*(qu\*~
    Delete Ps Column(s) (default = 1) (DECDC), VT420 and up.

    $*

    \*(Os\*(Ps\*s\*;\*(Pt\*s\*(ST
    \*(Os\*(Ps\*s\*;\*(Pt\*s\*(Be
    Set Text Parameters. For colors and font, if Pt is a "?", the control sequence elicits a response which consists of the control sequence which would set the corresponding value. The dtterm control sequences allow you to determine the icon name and window title. Ps = 0 -> Change Icon Name and Window Title to Pt.
    Ps = 1 -> Change Icon Name to Pt.
    Ps = 2 -> Change Window Title to Pt.
    Ps = 3 -> Set X property on top-level window.
    Pt should be in the form "prop=value", or just "prop" to delete the property Ps = 4;c;spec -> Change Color Number c to
    the color specified by spec. This can be a name or RGB specification as per XParseColor. Any number of c/spec pairs may be given. The color numbers correspond to the ANSI colors 0-7, their bright versions 8-15, and if supported, the remainder of the 88-color or 256-color table.

    If a "?" is given rather than a name or RGB specification, xterm replies with a control sequence of the same form which can be used to set the corresponding color. Because more than one pair of color number and specification can be given in one control sequence, xterm can make more than one reply.

    Ps = 5;c;spec -> Change Special Color Number c to
    the color specified by spec. This can be a name or RGB specification as per XParseColor. Any number of c/spec pairs may be given. The special colors can also be set by adding the maximum number of colors to these codes in an s4 control:

    Pc = 0 <- resource colorBD (BOLD).
    Pc = 1 <- resource colorUL (UNDERLINE).
    Pc = 2 <- resource colorBL (BLINK).
    Pc = 3 <- resource colorRV (REVERSE).
    Pc = 4 <- resource colorIT (ITALIC).

    Ps = 6;c;f -> Enable/disable Special Color Number c.
    s6 is the same as s106.

    The 10 colors (below) which may be set or queried using 10 through 19 are denoted dynamic colors, since the corresponding control sequences were the first means for setting xterm's colors dynamically, i.e., after it was started. They are not the same as the ANSI colors. These controls may be disabled using the allowColorOps resource. At least one parameter is expected for Pt. Each successive parameter changes the next color in the list. The value of Ps tells the starting point in the list. The colors are specified by name or RGB specification as per XParseColor.

    If a "?" is given rather than a name or RGB specification, xterm replies with a control sequence of the same form which can be used to set the corresponding dynamic color. Because more than one pair of color number and specification can be given in one control sequence, xterm can make more than one reply.

    Ps = 10 -> Change VT100 text foreground color to Pt.
    Ps = 11 -> Change VT100 text background color to Pt.
    Ps = 12 -> Change text cursor color to Pt.
    Ps = 13 -> Change mouse foreground color to Pt.
    Ps = 14 -> Change mouse background color to Pt.
    Ps = 15 -> Change Tektronix foreground color to Pt.
    Ps = 16 -> Change Tektronix background color to Pt.
    Ps = 17 -> Change highlight background color to Pt.
    Ps = 18 -> Change Tektronix cursor color to Pt.
    Ps = 19 -> Change highlight foreground color to Pt.

    Ps = 46 -> Change Log File to Pt. (This is normally disabled by a
    compile-time option).

    Ps = 50 -> Set Font to Pt.
    These controls may be disabled using the allowFontOps resource. If Pt begins with a "#", index in the font menu, relative (if the next character is a plus or minus sign) or absolute. A number is expected but not required after the sign (the default is the current entry for relative, zero for absolute indexing).
    The same rule (plus or minus sign, optional number) is used when querying the font. The remainder of Pt is ignored.
    A font can be specified after a "#" index expression, by adding a space and then the font specifier.
    If the "TrueType Fonts" menu entry is set (the renderFont resource), then this control sets/queries the faceName resource.

    Ps = 51 -> reserved for Emacs shell.

    Ps = 52 -> Manipulate Selection Data.
    These controls may be disabled using the allowWindowOps resource. The parameter Pt is parsed as
       Pc;Pd

    The first, Pc, may contain zero or more characters from the set c p cs 0 1 2 3 4 5 6 7. It is used to construct a list of selection parameters for clipboard, primary, select, or cut buffers 0 through 7 respectively, in the order given. If the parameter is empty, xterm uses cs0, to specify the configurable primary/clipboard selection and cut buffer 0.
    The second parameter, Pd, gives the selection data. Normally this is a string encoded in base64. The data becomes the new selection, which is then available for pasting by other applications.
    If the second parameter is a ?, xterm replies to the host with the selection data encoded using the same protocol.
    If the second parameter is neither a base64 string nor ?, then the selection is cleared.

    Ps = 104;c -> Reset Color Number c. It is reset to
    the color specified by the corresponding X resource. Any number of c parameters may be given. These parameters correspond to the ANSI colors 0-7, their bright versions 8-15, and if supported, the remainder of the 88-color or 256-color table. If no parameters are given, the entire table will be reset.

    Ps = 105;c -> Reset Special Color Number c. It is reset to
    the color specified by the corresponding X resource. Any number of c parameters may be given. These parameters correspond to the special colors which can be set using an s5 control (or by adding the maximum number of colors using an s4 control).

    Ps = 106;c;f -> Enable/disable Special Color Number c.
    The second parameter tells xterm to enable the corresponding color mode if nonzero, disable it if zero.

    Pc = 0 <- resource colorBDMode (BOLD).
    Pc = 1 <- resource colorULMode (UNDERLINE).
    Pc = 2 <- resource colorBLMode (BLINK).
    Pc = 3 <- resource colorRVMode (REVERSE).
    Pc = 4 <- resource colorITMode (ITmacro "T&" not recognized -- ignoring ALIC).
    Pc = 5 <- resource colorAttrMode (Override ANSI).

    The dynamic colors can also be reset to their default (resource) values: Ps = 110 -> Reset VT100 text foreground color.
    Ps = 111 -> Reset VT100 text background color.
    Ps = 112 -> Reset text cursor color.
    Ps = 113 -> Reset mouse foreground color.
    Ps = 114 -> Reset mouse background color.
    Ps = 115 -> Reset Tektronix foreground color.
    Ps = 116 -> Reset Tektronix background color.
    Ps = 117 -> Reset highlight color.
    Ps = 118 -> Reset Tektronix cursor color.
    Ps = 119 -> Reset highlight foreground color.

    $*

    \*(PM\*(Pt\*s\*(ST
    xterm implements no PM functions; Pt is ignored. Pt need not be printable characters.

    Alt and Meta Keys

    Many keyboards have keys labeled "Alt". Few have keys labeled "Meta". However, xterm's default translations use the Meta modifier. Common keyboard configurations assign the Meta modifier to an "Alt" key. By using xmodmap one may have the modifier assigned to a different key, and have "real" alt and meta keys. Here is an example: ! put meta on mod3 to distinguish it from alt keycode 64 = Alt_L clear mod1 add mod1 = Alt_L keycode 115 = Meta_L clear mod3 add mod3 = Meta_L

    The metaSendsEscape resource (and altSendsEscape if altIsNotMeta is set) can be used to control the way the Meta modifier applies to ordinary keys unless the modifyOtherKeys resource is set:

    -
    prefix a key with the s character.
    -
    shift the key from codes 0-127 to 128-255 by adding 128.

    The table shows the result for a given character "x" with modifiers according to the default translations with the resources set on or off. This assumes altIsNotMeta is set:

    l | l | l | l .
    key    altSendsEscape    metaSendsEscape    result
    x    off    off    x
    Meta-x    off    off    shift
    Alt-x    off    off    shift
    Alt+Meta-x    off    off    shift
    x    ON    off    x
    Meta-x    ON    off    shift
    Alt-x    ON    off    s x
    Alt+Meta-x    ON    off    s shift
    x    off    ON    x
    Meta-x    off    ON    s x
    Alt-x    off    ON    shift
    Alt+Meta-x    off    ON    s shift
    x    ON    ON    x
    Meta-x    ON    ON    s x
    Alt-x    ON    ON    s x
    Alt+Meta-x    ON    ON    s x

    PC-Style Function Keys

    If xterm does minimal translation of the function keys, it usually does this with a PC-style keyboard, so PC-style function keys result. Sun keyboards are similar to PC keyboards. Both have cursor and scrolling operations printed on the keypad, which duplicate the smaller cursor and scrolling keypads.

    X does not predefine NumLock (used for VT220 keyboards) or Alt (used as an extension for the Sun/PC keyboards) as modifiers. These keys are recognized as modifiers when enabled by the numLock resource, or by the "DECSET 1035" control sequence.

    The cursor keys transmit the following escape sequences depending on the mode specified via the DECCKM escape sequence.

    KeyNormalApplication
    l | l | l .
    Cursor UpCAN sASUB 3A
    Cursor DownCAN sBSUB 3B
    Cursor RightCAN sCAN SUB 3CAN
    Cursor LeftCAN sDSUB 3D
    The home- and end-keys (unlike PageUp and other keys also on the 6-key editing keypad) are considered "cursor keys" by xterm. Their mode is also controlled by the DECCKM escape sequence:
    KeyNormalApplication
    l | l | l .
    HomeCAN sHSUB 3H
    EndCAN sFSUB 3F

    The application keypad transmits the following escape sequences depending on the mode specified via the DECKPNM and DECKPAM escape sequences. Use the NumLock key to override the application mode.

    Not all keys are present on the Sun/PC keypad (e.g., PF1, Tab), but are supported by the program.

    KeyNumericApplicationTerminfoTermcap
    l | l | l | l | l .
    SpaceSUB pSUB 3SUB p--
    TabTAB aSUB 3I--
    EnterCAN rSUB 3Mkent@8
    PF1SUB 3PSUB 3Pkf1k1
    PF2SUB 3QSUB 3Qkf2k2
    PF3SUB 3RSUB 3Rkf3k3
    PF4SUB 3SUB SUB 3SUB kf4k4
    * (multiply)*SUB 3j--
    + (add)+SUB 3k--
    , (comma),SUB 3l--
    - (minus)-SUB 3m--
    . (Delete).CAN s3c~--
    / (divide)/SUB 3o--
    0 (Insert)0CAN s2c~--
    1 (End)1SUB 3Fkc1K4
    2 (DownArrow)2CAN sB--
    3 (PageDown)3CAN s6c~kc3K5
    4 (LeftArrow)4CAN sD--
    5 (Begin)5CAN skb2K2
    6 (RightArrow)6CAN sCAN --
    7 (Home)7SUB 3Hka1K1
    8 (UpArrow)8CAN sA--
    9 (PageUp)9CAN s5c~ka3K3
    = (equal)=SUB 3ETX X--

    They also provide 12 function keys, as well as a few other special-purpose keys:
    KeyEscape Sequence
    l | l .
    F1SUB 3P
    F2SUB 3Q
    F3SUB 3R
    F4SUB 3SUB
    F5CAN s15c~
    F6CAN s17c~
    F7CAN s18c~
    F8CAN s19c~
    F9CAN s20c~
    F10CAN s21c~
    F11CAN s23c~
    F12CAN s24c~

    Older versions of xterm implement different escape sequences for F1 through F4. These can be activated by setting the oldXtermFKeys resource. However, since they do not correspond to any hardware terminal, they have been deprecated. (The DEC VT220 reserves F1 through F5 for local functions such as Setup).

    KeyEscape Sequence
    l | l .
    F1CAN s11c~
    F2CAN s12c~
    F3CAN s13c~
    F4CAN s14c~
    In normal mode, i.e., a Sun/PC keyboard when the sunKeyboard resource is false, xterm recognizes function key modifiers which are parameters appended before the final character of the control sequence.
    CodeModifiers
    c | l .
    2Shift
    3Alt
    4Shift + Alt
    5Control
    6Shift + Control
    7Alt + Control
    8Shift + Alt + Control
    9Meta
    10Meta + Shift
    11Meta + Alt
    12Meta + Alt + Shift
    13Meta + Ctrl
    14Meta + Ctrl + Shift
    15Meta + Ctrl + Alt
    16Meta + Ctrl + Alt + Shift
    For example, shift-F5 would be sent as CAN s15;2c~

    If the alwaysUseMods resource is set, the Meta modifier also is recognized, making parameters 9 through 16.

    VT220-Style Function Keys

    However, xterm is most useful as a DEC VT102 or VT220 emulator. Set the sunKeyboard resource to true to force a Sun/PC keyboard to act like a VT220 keyboard.

    The VT102/VT220 application keypad transmits unique escape sequences in application mode, which are distinct from the cursor and scrolling keypad:

    KeyNumericApplication
    l | l | l .
    SpaceSUB pSUB 3SUB p
    TabTAB aSUB 3I
    EnterCAN rSUB 3M
    PF1SUB 3PSUB 3P
    PF2SUB 3QSUB 3Q
    PF3SUB 3RSUB 3R
    PF4SUB 3SUB SUB 3SUB
    * (multiply)*SUB 3j
    + (add)+SUB 3k
    , (comma),SUB 3l
    - (minus)-SUB 3m
    . (period).SUB 3n
    / (divide)/SUB 3o
    00SUB 3p
    11SUB 3q
    22SUB 3r
    33SUB 3cs
    44SUB 3t
    55SUB 3u
    66SUB 3v
    77SUB 3w
    88SUB 3x
    99SUB 3y
    = (equal)=SUB 3ETX X
    The VT220 provides a 6-key editing keypad, which is analogous to that on the PC keyboard. It is not affected by DECCKM or DECKPNM/DECKPAM:
    KeyNormalApplication
    l | l | l .
    InsertCAN s2c~CAN s2c~
    DeleteCAN s3c~CAN s3c~
    HomeCAN s1c~CAN s1c~
    EndCAN s4c~CAN s4c~
    PageUpCAN s5c~CAN s5c~
    PageDownCAN s6c~CAN s6c~

    The VT220 provides 8 additional function keys. With a Sun/PC keyboard, access these keys by Control/F1 for F13, etc.

    KeyEscape Sequence
    l | l .
    F13CAN s25c~
    F14CAN s26c~
    F15CAN s28c~
    F16CAN s29c~
    F17CAN s31c~
    F18CAN s32c~
    F19CAN s33c~
    F20CAN s34c~

    VT52-Style Function Keys

    A VT52 does not have function keys, but it does have a numeric keypad and cursor keys. They differ from the other emulations by the prefix. Also, the cursor keys do not change:

    KeyNormal/Application
    l | l .
    Cursor UpsA
    Cursor DownsB
    Cursor RightsCAN
    Cursor LeftsD
    The keypad is similar:
    KeyNumericApplication
    l | l | l .
    SpaceSUB ps?SUB p
    TabTAB as?I
    EnterCAN rs?M
    PF1sPsP
    PF2sQsQ
    PF3sRsR
    PF4sSUB sSUB
    * (multiply)*s?j
    + (add)+s?k
    , (comma),s?l
    - (minus)-s?m
    . (period).s?n
    / (divide)/s?o
    00s?p
    11s?q
    22s?r
    33s?cs
    44s?t
    55s?u
    66s?v
    77s?w
    88s?x
    99s?y
    = (equal)=s?ETX X

    Sun-Style Function Keys

    The xterm program provides support for Sun keyboards more directly, by a menu toggle that causes it to send Sun-style function key codes rather than VT220. Note, however, that the sun and VT100 emulations are not really compatible. For example, their wrap-margin behavior differs.

    Only function keys are altered; keypad and cursor keys are the same. The emulation responds identically. See the xterm-sun terminfo entry for details.

    HP-Style Function Keys

    Similarly, xterm can be compiled to support HP keyboards. See the xterm-hp terminfo entry for details.

    The Alternate Screen Buffer

    Xterm maintains two screen buffers. The normal screen buffer allows you to scroll back to view saved lines of output up to the maximum set by the saveLines resource. The alternate screen buffer is exactly as large as the display, contains no additional saved lines. When the alternate screen buffer is active, you cannot scroll back to view saved lines. Xterm provides control sequences and menu entries for switching between the two.

    Most full-screen applications use terminfo or termcap to obtain strings used to start/stop full-screen mode, i.e., smcup and rmcup for terminfo, or the corresponding ti and te for termcap. The titeInhibit resource removes the ti and te strings from the TERMCAP string which is set in the environment for some platforms. That is not done when xterm is built with terminfo libraries because terminfo does not provide the whole text of the termcap data in one piece. It would not work for terminfo anyway, since terminfo data is not passed in environment variables; setting an environment variable in this manner would have no effect on the application's ability to switch between normal and alternate screen buffers. Instead, the newer private mode controls (such as 1049) for switching between normal and alternate screen buffers simply disable the switching. They add other features such as clearing the display for the same reason: to make the details of switching independent of the application that requests the switch.

    Bracketed Paste Mode

    When bracketed paste mode is set, pasted text is bracketed with control sequences so that the program can differentiate pasted text from typed-in text. When bracketed paste mode is set, the program will receive: s[200~,

    followed by the pasted text, followed by s[201~.

    Title Modes

    The window- and icon-labels can be set or queried using control sequences. As a VT220-emulator, xterm "should" limit the character encoding for the corresponding strings to ISO-8859-1. Indeed, it used to be the case (and was documented) that window titles had to be ISO-8859-1. This is no longer the case. However, there are many applications which still assume that titles are set using ISO-8859-1. So that is the default behavior.

    If xterm is running with UTF-8 encoding, it is possible to use window- and icon-labels encoded using UTF-8. That is because the underlying X libraries (and many, but not all) window managers support this feature.

    The utf8Title X resource setting tells xterm to disable a reconversion of the title string back to ISO-8859-1, allowing the title strings to be interpreted as UTF-8. The same feature can be enabled using the title mode control sequence described in this summary.

    Separate from the ability to set the titles, xterm provides the ability to query the titles, returning them either in ISO-8859-1 or UTF-8. This choice is available only while xterm is using UTF-8 encoding.

    Finally, the characters sent to, or returned by a title control are less constrained than the rest of the control sequences. To make them more manageable (and constrained), for use in shell scripts, xterm has an optional feature which decodes the string from hexadecimal (for setting titles) or for encoding the title into hexadecimal when querying the value.

    Mouse Tracking

    The VT widget can be set to send the mouse position and other information on button presses. These modes are typically used by editors and other full-screen applications that want to make use of the mouse.

    There are two sets of mutually exclusive modes:

      ·
    • mouse protocol
    • ·
    • protocol encoding

    The mouse protocols include DEC Locator mode, enabled by the DECELR CAN sPs;Ps'z control sequence, and is not described here (control sequences are summarized above). The remaining five modes of the mouse protocols are each enabled (or disabled) by a different parameter in the "DECSET CAN s?Pmh" or "DECRST CAN s?Pml" control sequence.

    Manifest constants for the parameter values are defined in xcharmouse.h as follows: #define SET_X10_MOUSE 9 #define SET_VT200_MOUSE 1000 #define SET_VT200_HIGHLIGHT_MOUSE 1001 #define SET_BTN_EVENT_MOUSE 1002 #define SET_ANY_EVENT_MOUSE 1003

    #define SET_FOCUS_EVENT_MOUSE 1004

    #define SET_EXT_MODE_MOUSE 1005 #define SET_SGR_EXT_MODE_MOUSE 1006 #define SET_URXVT_EXT_MODE_MOUSE 1015

    #define SET_ALTERNATE_SCROLL 1007
    The motion reporting modes are strictly xterm extensions, and are not part of any standard, though they are analogous to the DEC VT200 DECELR locator reports.

    Normally, parameters (such as pointer position and button number) for all mouse tracking escape sequences generated by xterm encode numeric parameters in a single character as value+32. For example, ! specifies the value 1. The upper left character position on the terminal is denoted as 1,1. This scheme dates back to X10, though the normal mouse-tracking (from X11) is more elaborate.

    $*

    X10 compatibility mode sends an escape sequence only on button press, encoding the location and the mouse button pressed. It is enabled by specifying parameter 9 to DECSET. On button press, xterm sends CAN sMCAN bCAN xCAN y (6 characters).

      ·
    • CAN b is button-1.
    • ·
    • CAN x and CAN y are the x and y coordinates of the mouse when the button was pressed.

    $*

    Normal tracking mode sends an escape sequence on both button press and release. Modifier key (shift, ctrl, meta) information is also sent. It is enabled by specifying parameter 1000 to DECSET. On button press or release, xterm sends CAN sMCAN bCAN xCAN y.

      ·
    • The low two bits of CAN b encode button information: 0=MB1 pressed, 1=MB2 pressed, 2=MB3 pressed, 3=release.
    • ·
    • The next three bits encode the modifiers which were down when the button was pressed and are added together: 4=Shift, 8=Meta, 16=Control. Note however that the shift and control bits are normally unavailable because xterm uses the control modifier with mouse for popup menus, and the shift modifier is used in the default translations for button events. The Meta modifier recognized by xterm is the mod1 mask, and is not necessarily the "Meta" key (see xmodmap).
    • ·
    • CAN x and CAN y are the x and y coordinates of the mouse event, encoded as in X10 mode.

    $*

    Wheel mice may return buttons 4 and 5. Those buttons are represented by the same event codes as buttons 1 and 2 respectively, except that 64 is added to the event code. Release events for the wheel buttons are not reported. By default, the wheel mouse events are translated to scroll-back and scroll-forw actions. Those actions normally scroll the whole window, as if the scrollbar was used. However if Alternate Scroll mode is set, then cursor up/down controls are sent when the terminal is displaying the alternate screen. The initial state of Alternate Scroll mode is set using the alternateScroll resource.

    $*

    Mouse highlight tracking notifies a program of a button press, receives a range of lines from the program, highlights the region covered by the mouse within that range until button release, and then sends the program the release coordinates. It is enabled by specifying parameter 1001 to DECSET. Highlighting is performed only for button 1, though other button events can be received.

    Warning: use of this mode requires a cooperating program or it will hang xterm.

    On button press, the same information as for normal tracking is generated; xterm then waits for the program to send mouse tracking information. All X events are ignored until the proper escape sequence is received from the pty: CAN sPs;Ps;Ps;Ps;PsTAB . The parameters are func, startx, starty, firstrow, and lastrow. func is non-zero to initiate highlight tracking and zero to abort. startx and starty give the starting x and y location for the highlighted region. The ending location tracks the mouse, but will never be above row firstrow and will always be above row lastrow. (The top of the screen is row 1.) When the button is released, xterm reports the ending position one of two ways:

      ·
    • if the start and end coordinates are the same locations:
      CAN stCAN xCAN y.
    • ·
    • otherwise:
      CAN sTAB CAN xCAN yCAN xCAN yCAN xCAN y.
      The parameters are startx, starty, endx, endy, mousex, and mousey.
    -
    startx, starty, endx, and endy give the starting and ending character positions of the region.
    -
    mousex and mousey give the location of the mouse at button up, which may not be over a character.

    $*

    Button-event tracking is essentially the same as normal tracking, but xterm also reports button-motion events. Motion events are reported only if the mouse pointer has moved to a different character cell. It is enabled by specifying parameter 1002 to DECSET. On button press or release, xterm sends the same codes used by normal tracking mode.

    $*

    Any-event mode is the same as button-event mode, except that all motion events are reported, even if no mouse button is down. It is enabled by specifying 1003 to DECSET.

    $*

    FocusIn/FocusOut can be combined with any of the mouse events since it uses a different protocol. When set, it causes xterm to send CAN sI when the terminal gains focus, and CAN s when it loses focus.

    $*

    The original X10 mouse protocol limits the CAN x and CAN y ordinates to 223 (=255 - 32). Xterm supports more than one scheme for extending this range, by changing the protocol encoding:

    UTF-8 (1005)
    This enables UTF-8 encoding for CAN x and CAN y under all tracking modes, expanding the maximum encodable position from 223 to 2015. For positions less than 95, the resulting output is identical under both modes. Under extended mouse mode, positions greater than 95 generate "extra" bytes which will confuse applications which do not treat their input as a UTF-8 stream. Likewise, CAN b will be UTF-8 encoded, to reduce confusion with wheel mouse events.
    Under normal mouse mode, positions outside (160,94) result in
    byte pairs which can be interpreted as a single UTF-8 character; applications which do treat their input as UTF-8 will almost certainly be confused unless extended mouse mode is active.
    This scheme has the drawback that the encoded coordinates will not
    pass through luit unchanged, e.g., for locales using non-UTF-8 encoding.
    SGR (1006)
    The normal mouse response is altered to use CAN s< followed by semicolon-separated encoded button value, the CAN x and CAN y ordinates and a final character which is M for button press and m for button release.
    ·
  • The encoded button value in this case does not add 32 since that was useful only in the X10 scheme for ensuring that the byte containing the button value is a printable code.
  • ·
  • The modifiers are encoded in the same way.
  • ·
  • A different final character is used for button release to resolve the X10 ambiguity regarding which button was released.
  • The highlight tracking responses are also modified to an SGR-like format,
    using the same SGR-style scheme and button-encodings.
    URXVT (1015)
    The normal mouse response is altered to use CAN s followed by semicolon-separated encoded button value, the CAN x and CAN y ordinates and final character M.
    This uses the same button encoding as X10, but printing it as
    a decimal integer rather than as a single byte.
    However, CANsM can be mistaken for DL (delete lines),
    while the highlight tracking CAN sTAB can be mistaken for SD (scroll down), and the Window manipulation controls. For these reasons, the 1015 control is not recommended; it is not an improvement over 1005.

    Sixel Graphics

    If xterm is configured as VT240, VT241, VT330, VT340 or VT382 using the decTerminalID resource, it supports Sixel Graphics controls, a palleted bitmap graphics system using sets of six vertical pixels as the basic element.

    \*(Cs\*(Ps\*s\*c
    xterm responds to Send Device Attributes (Primary DA) with these additional codes: Ps = 4 -> Sixel graphics.
    \*(Cs\*?\*(Pm\*s\*h
    xterm has these additional private Set Mode values: Ps = 80 -> Sixel scrolling.
    Ps = 1070 -> use private color registers for each graphic.
    Ps = 8452 -> Sixel scrolling leaves cursor to right of graphic.
    \*(Dc\*(Pa\*;\*(Pb\*;\*(Ph\*s\*q\*s\*(Ps..\*(Ps\*s\*(ST
    See http://vt100.net/docs/vt3xx-gp/chapter14.html The sixel data device control string has three positional parameters, following the q with sixel data. Pa -> pixel aspect ratio
    Pb -> background color option
    Ph -> horizontal grid size (ignored).
    Ps -> sixel data

    ReGIS Graphics

    If xterm is configured as VT125, VT240, VT241, VT330 or VT340 using the decTerminalID resource, it supports Remote Graphic Instruction Set, a graphics description language.

    \*(Cs\*(Ps\*s\*c
    xterm responds to Send Device Attributes (Primary DA) with these additional codes: Ps = 3 -> ReGIS graphics.
    \*(Cs\*?\*(Pm\*s\*h
    xterm has these additional private Set Mode values: Ps = 1070 -> use private color registers for each graphic.
    \*(Dc\*(Pm\*s\*p\*(Pr..\*(Pr\*s\*(ST
    See http://vt100.net/docs/vt3xx-gp/chapter1.html The ReGIS data device control string has one positional parameter with four possible values: Pm = 0 -> resume command, use fullscreen mode
    Pm = 1 -> start new command, use fullscreen mode
    Pm = 2 -> resume command, use command display mode
    Pm = 3 -> start new command, use command display mode

    Tektronix 4014 Mode

    Most of these sequences are standard Tektronix 4014 control sequences. Graph mode supports the 12-bit addressing of the Tektronix 4014. The major features missing are the write-through and defocused modes. This document does not describe the commands used in the various Tektronix plotting modes but does describe the commands to switch modes.

    \*(Be
    Bell (Ctrl-G).
    \*(Bs
    Backspace (Ctrl-H).
    \*(Ta
    Horizontal Tab (Ctrl-I).
    \*(Lf
    Line Feed or New Line (Ctrl-J).
    \*(Vt
    Cursor up (Ctrl-K).
    \*(Ff
    Form Feed or New Page (Ctrl-L).
    \*(Cr
    Carriage Return (Ctrl-M).
    \*(Es\*(Et
    Switch to VT100 Mode (s Ctrl-C).
    \*(Es\*(En
    Return Terminal Status (s Ctrl-E).
    \*(Es\*(Ff
    PAGE (Clear Screen) (s Ctrl-L).
    \*(Es\*(So
    Begin 4015 APL mode (s Ctrl-N). (This is ignored by xterm).
    \*(Es\*(Si
    End 4015 APL mode (s Ctrl-O). (This is ignored by xterm).
    \*(Es\*(Eb
    COPY (Save Tektronix Codes to file COPYyyyy-mm-dd.hh:mm:ss). b (end transmission block) is the same as Ctrl-W.
    \*(Es\*(Ca
    Bypass Condition (s Ctrl-X).
    \*(Es\*(Su
    GIN mode (s Ctrl-Z).
    \*(Es\*(Fs
    Special Point Plot Mode (s Ctrl-\).
    \*(Es\*8
    Select Large Character Set.
    \*(Es\*9
    Select #2 Character Set.
    \*(Es\*:
    Select #3 Character Set.
    \*(Es\*;
    Select Small Character Set.
    \*(Os\*(Ps\*s\*;\*(Pt\*s\*(Be
    Set Text Parameters of VT window. Ps = 0 -> Change Icon Name and Window Title to Pt.
    Ps = 1 -> Change Icon Name to Pt.
    Ps = 2 -> Change Window Title to Pt.
    Ps = 46 -> Change Log File to Pt. (This is normally disabled by a
    compile-time option).
    \*(Es\*`
    Normal Z Axis and Normal (solid) Vectors.
    \*(Es\*a
    Normal Z Axis and Dotted Line Vectors.
    \*(Es\*b
    Normal Z Axis and Dot-Dashed Vectors.
    \*(Es\*c
    Normal Z Axis and Short-Dashed Vectors.
    \*(Es\*d
    Normal Z Axis and Long-Dashed Vectors.
    \*(Es\*h
    Defocused Z Axis and Normal (solid) Vectors.
    \*(Es\*i
    Defocused Z Axis and Dotted Line Vectors.
    \*(Es\*j
    Defocused Z Axis and Dot-Dashed Vectors.
    \*(Es\*k
    Defocused Z Axis and Short-Dashed Vectors.
    \*(Es\*l
    Defocused Z Axis and Long-Dashed Vectors.
    \*(Es\*p
    Write-Thru Mode and Normal (solid) Vectors.
    \*(Es\*q
    Write-Thru Mode and Dotted Line Vectors.
    \*(Es\*r
    Write-Thru Mode and Dot-Dashed Vectors.
    \*(Es\*(cs
    Write-Thru Mode and Short-Dashed Vectors.
    \*(Es\*t
    Write-Thru Mode and Long-Dashed Vectors.
    \*(Fs
    Point Plot Mode (Ctrl-\).
    \*(Gs
    Graph Mode (Ctrl-]).
    \*(Rs
    Incremental Plot Mode (Ctrl-^).
    \*(Us
    Alpha Mode (Ctrl-_).

    VT52 Mode

    Parameters for cursor movement are at the end of the sY escape sequence. Each ordinate is encoded in a single character as value+32. For example, ! is 1. The screen coordinate system is 0-based.

    \*(Es\*A
    Cursor up.
    \*(Es\*(cB
    Cursor down.
    \*(Es\*C
    Cursor right.
    \*(Es\*D
    Cursor left.
    \*(Es\*F
    Enter graphics mode.
    \*(Es\*G
    Exit graphics mode.
    \*(Es\*H
    Move the cursor to the home position.
    \*(Es\*I
    Reverse line feed.
    \*(Es\*J
    Erase from the cursor to the end of the screen.
    \*(Es\*K
    Erase from the cursor to the end of the line.
    \*(Es\*Y\*(Ps\*s\*(Ps
    Move the cursor to given row and column.
    \*(Es\*Z
    Identify. -> s/Z (``I am a VT52.'').
    \*(Es\*=
    Enter alternate keypad mode.
    \*(Es\*>
    Exit alternate keypad mode.
    \*(Es\*<
    Exit VT52 mode (Enter VT100 mode).


    Table of Contents