summaryrefslogtreecommitdiff
path: root/app/xterm/ctlseqs.txt
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2010-03-25 22:03:52 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2010-03-25 22:03:52 +0000
commite16a08ded404b24025fc0707bfb3f6c3c76fd9b8 (patch)
treef25c0c31ae03d777014c4f64479de8c7f4c7f639 /app/xterm/ctlseqs.txt
parentcea3749b11718d3b585f653d4acbb6c5287794cb (diff)
Update to xterm-255. Tested by stsp@, oga@.
Diffstat (limited to 'app/xterm/ctlseqs.txt')
-rw-r--r--app/xterm/ctlseqs.txt168
1 files changed, 146 insertions, 22 deletions
diff --git a/app/xterm/ctlseqs.txt b/app/xterm/ctlseqs.txt
index 5644dc8af..d6595be45 100644
--- a/app/xterm/ctlseqs.txt
+++ b/app/xterm/ctlseqs.txt
@@ -9,6 +9,7 @@
Xterm Control Sequences
+
Edward Moy
University of California, Berkeley
@@ -19,7 +20,7 @@
Thomas Dickey
XFree86 Project (1996-2006)
- invisible-island.net (2006-2008)
+ invisible-island.net (2006-2010)
@@ -192,11 +193,21 @@ DCS $ q Pt ST
xterm responds with DCS 1 $ r Pt ST for valid requests,
replacing the Pt with the corresponding CSI string, or DCS 0 $
r Pt ST for invalid requests.
+DCS + p Pt 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 used for the "tcap"
+ keyboard configuration's function- and special-keys, as well
+ as by the Request Termcap/Terminfo String control.
+
DCS + q Pt ST
Request Termcap/Terminfo String (xterm, experimental). The
- string following the "q" is a list of names encoded in hex-
- adecimal (2 digits per character) separated by ; which corre-
+ string following the "q" is a list of names encoded in hexa-
+ decimal (2 digits per character) separated by ; which corre-
spond 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 + r Pt ST for valid requests, adding
to Pt an = , and the value of the corresponding string that
xterm would send, or DCS 0 + r Pt ST for invalid requests.
@@ -243,6 +254,16 @@ CSI Ps ; Ps ; Ps ; Ps ; Ps T
Initiate highlight mouse tracking. Parameters are
[func;startx;starty;firstrow;lastrow]. See the section Mouse
Tracking.
+CSI > Ps; Ps T
+ Reset one or more features of the title modes to the default
+ value. Normally, "reset" disables the feature. It is possi-
+ ble 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")
CSI Ps X Erase Ps Character(s) (default = 1) (ECH)
CSI Ps Z Cursor Backward Tabulation Ps tab stops (default = 1) (CBT)
CSI Pm ` Character Position Absolute [column] (default = [row,1])
@@ -578,6 +599,13 @@ CSI Ps ; Ps " p
Ps = 0 -> 8-bit controls
Ps = 1 -> 7-bit controls (always set for VT100)
Ps = 2 -> 8-bit controls
+CSI Ps 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
CSI Ps " q
Select character protection attribute (DECSCA). Valid values
for the parameter:
@@ -605,23 +633,23 @@ CSI Ps ; Ps ; Ps t
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
+ Ps = 3 ; x ; y -> Move window to [x, y].
+ Ps = 4 ; height ; width -> Resize the xterm window to
height and width in pixels.
Ps = 5 -> Raise the xterm window to the front of the stack-
ing 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
+ Ps = 8 ; height ; width -> Resize the text area to
[height;width] in characters.
- Ps = 9 ; 0 -> Restore maximized window.
- Ps = 9 ; 1 -> Maximize window (i.e., resize to screen
+ Ps = 9 ; 0 -> Restore maximized window.
+ Ps = 9 ; 1 -> Maximize window (i.e., resize to screen
size).
Ps = 1 1 -> Report xterm window state. If the xterm window
is open (non-iconified), it returns CSI 1 t . If the xterm
window is iconified, it returns CSI 2 t .
- Ps = 1 3 -> Report xterm window position as CSI 3 ; x; yt
+ Ps = 1 3 -> Report xterm window position as CSI 3 ; x ; y t
Ps = 1 4 -> Report xterm window in pixels as CSI 4 ;
height ; width t
Ps = 1 8 -> Report the size of the text area in characters
@@ -630,13 +658,39 @@ CSI Ps ; Ps ; Ps t
CSI 9 ; height ; width t
Ps = 2 0 -> Report xterm window's icon label as OSC L
label ST
- Ps = 2 1 -> Report xterm window's title as OSC l title ST
+ Ps = 2 1 -> Report xterm window's title as OSC L label ST
+ Ps = 2 2 ; 0 -> Save xterm icon and window title on
+ stack.
+ Ps = 2 2 ; 1 -> Save xterm icon title on stack.
+ Ps = 2 2 ; 2 -> Save xterm window title on stack.
+ Ps = 2 3 ; 0 -> Restore xterm icon and window title from
+ stack.
+ Ps = 2 3 ; 1 -> Restore xterm icon title from stack.
+ Ps = 2 3 ; 2 -> Restore xterm window title from stack.
Ps >= 2 4 -> Resize to Ps lines (DECSLPP)
CSI Pt; Pl; Pb; Pr; Ps$ t
Reverse Attributes in Rectangular Area (DECRARA).
Pt; Pl; Pb; Pr denotes the rectangle.
Ps denotes the attributes to reverse. 1, 4, 5, 7
+CSI > Ps; Ps 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 discus-
+ sion of "Title Modes")
+CSI Ps 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
CSI u Restore cursor (ANSI.SYS)
+CSI Ps 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
CSI Pt; Pl; Pb; Pr; Pp; Pt; Pl; Pp$ v
Copy Rectangular Area (DECCRA)
Pt; Pl; Pb; Pr denotes the rectangle.
@@ -769,15 +823,27 @@ OSC Ps ; Pt BEL
one pair of color number and specification can be given in one
control sequence, xterm can make more than one reply.
- The 8 colors which may be set using 1 0 through 1 7 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. One or more parameters 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.
+ Ps = 5 ; c ; spec -> Change Special Color Number c to the
+ color specified by spec, i.e., a name or RGB specification as
+ per XParseColor. Any number of c name pairs may be given.
+ The special colors can also be set by adding the maximum num-
+ ber of colors to these codes in an OSC 4 control:
+
+ Pc = 0 -> resource colorBD (BOLD)
+ Pc = 1 -> resource colorUL (UNDERLINE)
+ Pc = 2 -> resource colorBL (BLINK)
+ Pc = 3 -> resource colorRV (REVERSE)
+
+ The 8 colors (below) which may be set or queried using 1 0
+ through 1 7 are denoted dynamic colors, since the correspond-
+ ing 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 specifi-
+ cation 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
@@ -799,11 +865,19 @@ OSC Ps ; Pt BEL
Ps = 4 6 -> Change Log File to Pt (normally disabled by a
compile-time option)
- Ps = 5 0 -> Set Font to Pt 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
+ Ps = 5 0 -> 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 = 5 1 (reserved for Emacs shell)
@@ -824,6 +898,31 @@ OSC Ps ; Pt BEL
If the second parameter is a ? , xterm replies to the host
with the selection data encoded using the same protocol.
+ Ps = 1 0 4 ; c -> Reset Color Number c to the color speci-
+ fied by the corresponding X resource. Any number of c parame-
+ ters 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 parame-
+ ters are given, the entire table will be reset.
+
+ Ps = 1 0 5 ; c -> Reset Special Color Number c 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 OSC 5 control (or by
+ adding the maximum number of colors using an OSC 4 control).
+
+ The dynamic colors can also be reset to their default
+ (resource) values:
+ Ps = 1 1 0 -> Reset VT100 text foreground color.
+ Ps = 1 1 1 -> Reset VT100 text background color.
+ Ps = 1 1 2 -> Reset text cursor color.
+ Ps = 1 1 3 -> Reset mouse foreground color.
+ Ps = 1 1 4 -> Reset mouse background color.
+ Ps = 1 1 5 -> Reset Tektronix foreground color.
+ Ps = 1 1 6 -> Reset Tektronix background color.
+ Ps = 1 1 7 -> Reset highlight color.
+ Ps = 1 1 8 -> Reset Tektronix cursor color.
+
Privacy Message
PM Pt ST xterm implements no PM functions; Pt is ignored. Pt need not
be printable characters.
@@ -1145,6 +1244,31 @@ sequences so that the program can differentiate pasted text from typed-
in text. When bracketed paste mode is set, the program will receive:
ESC [ 200 ~, followed by the pasted text, followed by ESC [ 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 appli-
+cations 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 informa-
tion on button presses. These modes are typically used by editors and