diff options
Diffstat (limited to 'app/xterm/ctlseqs.txt')
-rw-r--r-- | app/xterm/ctlseqs.txt | 978 |
1 files changed, 548 insertions, 430 deletions
diff --git a/app/xterm/ctlseqs.txt b/app/xterm/ctlseqs.txt index d1faa6dd5..3e06c0e26 100644 --- a/app/xterm/ctlseqs.txt +++ b/app/xterm/ctlseqs.txt @@ -20,8 +20,8 @@ Thomas Dickey XFree86 Project (1996-2006) - invisible-island.net (2006-2019) - updated for XTerm Patch #350 (2019/11/02) + invisible-island.net (2006-2020) + updated for XTerm Patch #363 (2020/12/25) @@ -38,8 +38,9 @@ C A single (required) character. Ps A single (usually optional) numeric parameter, composed of one or more digits. -Pm Any number of single numeric parameters, separated by ; charac- - ter(s). Individual values for the parameters are listed with Ps . +Pm 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. @@ -59,8 +60,8 @@ o This means that a C1 control can be mistaken for badly-formed UTF-8 continuation bytes of a UTF-8 encoded (multibyte) value. o It is not possible to use a C1 control obtained from decoding the - UTF-8 text, because that would require reprocessing the data. Con- - sequently there is no ambiguity in the way this document uses the + UTF-8 text, because that would require reprocessing the data. + Consequently there is no ambiguity in the way this document uses the term "character" to refer to bytes in a control sequence. The order of processing is a necessary consequence of the way ECMA-48 is @@ -81,8 +82,8 @@ o Eight-bit controls can have intermediate, etc., bytes in the range 160 to 255. Those can be treated as their counterparts in the range 32 to 127. -o Single-byte controls can be handled separately from multi-byte con- - trol sequences because ECMA-48's rules are unambiguous. +o Single-byte controls can be handled separately from multi-byte + control sequences because ECMA-48's rules are unambiguous. As a special case, ECMA-48 (section 9) mentions that the control functions shift-in and shift-out are allowed to occur within a 7-bit @@ -92,36 +93,36 @@ o Single-byte controls can be handled separately from multi-byte con- o Some controls (such as OSC ) introduce a string mode, which is ended on a ST (string terminator). - ECMA-48 describes only correct behavior, telling what types of char- - acters are expected at each stage of the control sequences. It says - that the action taken in error recovery is implementation-dependent. - XTerm decodes control sequences using a state machine. It handles - errors in decoding i.e., unexpected characters, by resetting to the - initial (ground) state. That is different from the treatment of - unimplemented (but correctly formatted) features. + ECMA-48 describes only correct behavior, telling what types of + characters are expected at each stage of the control sequences. It + says that the action taken in error recovery is implementation- + dependent. XTerm decodes control sequences using a state machine. + It handles errors in decoding i.e., unexpected characters, by + resetting to the initial (ground) state. That is different from the + treatment of unimplemented (but correctly formatted) features. If an application does not send the string terminator, that is also an error from the standpoint of a user. To accommodate users of - those applications, xterm has resource settings which allow work- - arounds: + those applications, xterm has resource settings which allow + workarounds: - o The Linux console's palette sequences do not use a string termi- - nator. The brokenLinuxOSC resource setting tells xterm to + o The Linux console's palette sequences do not use a string + terminator. The brokenLinuxOSC resource setting tells xterm to ignore those particular sequences. o The terminal should accept single-byte controls within the string. But some applications omit a string terminator, like the Linux console. The brokenStringTerm resource setting tells - xterm to exit string mode if it decodes a common control charac- - ter such as carriage return before the string terminator. + xterm to exit string mode if it decodes a common control + character such as carriage return before the string terminator. 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 equiva- -lent: +The following pairs of 7-bit and 8-bit control characters are +equivalent: ESC D Index (IND is 0x84). @@ -191,13 +192,13 @@ brevity, the document refers to the related models: 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 ECMA-48 and aixterm color controls. The only -VT102 feature not supported is auto-repeat, since the only way X pro- -vides for this will affect all windows. +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 func- -tions, such as the scrollbar or window size. Where the function is -specified by DEC or ECMA-48, the code assigned to it is given in paren- -theses. +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 ECMA-48, 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). @@ -215,8 +216,8 @@ BS Backspace (BS is Ctrl-H). CR Carriage Return (CR is Ctrl-M). ENQ Return Terminal Status (ENQ is Ctrl-E). Default response is - an empty string, but may be overridden by a resource answer- - backString. + an empty string, but may be overridden by a resource + answerbackString. FF Form Feed or New Page (NP ). (FF is Ctrl-L). FF is treated the same as LF . @@ -281,13 +282,13 @@ ESC ( C Designate G0 Character Set, VT100, ISO 2022. o a few were introduced in the VT300 series, and o a few more were introduced in the VT500 series. The VT220 character sets, together with a few others (such as - Portuguese) are activated by the National Replacement Charac- - ter Set (NRCS) controls. The term "replacement" says that the - character set is formed by replacing some of the characters in - a set (termed the Multinational Character Set) with more use- - ful ones for a given language. The ASCII and DEC Supplemental - character sets make up the two halves of the Multinational - Character set, initially mapped to GL and GR. + Portuguese) are activated by the National Replacement + Character Set (NRCS) controls. The term "replacement" says + that the character set is formed by replacing some of the + characters in a set (termed the Multinational Character Set) + with more useful ones for a given language. The ASCII and DEC + Supplemental character sets make up the two halves of the + Multinational Character set, initially mapped to GL and GR. The valid final characters C for this control are: C = A -> United Kingdom (UK), VT100. C = B -> United States (USASCII), VT100. @@ -312,14 +313,15 @@ ESC ( C Designate G0 Character Set, VT100, ISO 2022. C = 0 -> DEC Special Character and Line Drawing Set, VT100. C = < -> DEC Supplemental, VT200. C = > -> DEC Technical, VT300. - These are documented as NRCS: + These are documented as 94-character sets (like USASCII) + without NRCS: C = " 4 -> DEC Hebrew, VT500. C = " ? -> DEC Greek, VT500. C = % 0 -> DEC Turkish, VT500. C = % 5 -> DEC Supplemental Graphics, VT300. C = & 4 -> DEC Cyrillic, VT500. - The VT520 reference manual lists a few more, but no documenta- - tion has been found for the mappings: + The VT520 reference manual lists a few more, but no + documentation has been found for the mappings: C = % 3 -> SCS NRCS, VT500. C = & 5 -> DEC Russian, VT500. @@ -338,6 +340,7 @@ ESC - C Designate G1 Character Set, VT300. space and DEL for the mapping of 0x20 and 0x7f. The valid final characters C for this control are: C = A -> ISO Latin-1 Supplemental, VT300. + C = B -> ISO Latin-2 Supplemental, VT500. C = F -> ISO Greek Supplemental, VT500. C = H -> ISO Hebrew Supplemental, VT500. C = L -> ISO Latin-Cyrillic, VT500. @@ -366,14 +369,14 @@ ESC F Cursor to lower left corner of screen. This is enabled by the ESC c Full Reset (RIS), VT100. -ESC l Memory Lock (per HP terminals). Locks memory above the cur- - sor. +ESC l Memory Lock (per HP terminals). Locks memory above the + cursor. ESC m Memory Unlock (per HP terminals). -ESC n Invoke the G2 Character Set as GL (LS2) as GL. +ESC n Invoke the G2 Character Set as GL (LS2). -ESC o Invoke the G3 Character Set as GL (LS3) as GL. +ESC o Invoke the G3 Character Set as GL (LS3). ESC | Invoke the G3 Character Set as GR (LS3R). @@ -402,10 +405,10 @@ DCS Ps ; Ps | Pt ST Ps = 0 <- Lock the keys (default). Ps = 1 <- Do not lock. - The third parameter is a ';'-separated list of strings denot- - ing 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). + 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). DCS $ q Pt ST Request Status String (DECRQSS), VT420 and up. @@ -424,15 +427,15 @@ DCS $ q Pt ST r Pt ST for invalid requests. DCS Ps $ t Pt ST - Restore presentation status (DECRSPS), VT320 and up. The con- - trol can be converted from a response from DECCIR or DECTABSR - by changing the first "u" to a "t" + Restore presentation status (DECRSPS), VT320 and up. The + control can be converted from a response from DECCIR or + DECTABSR by changing the first "u" to a "t" Ps = 1 -> DECCIR Ps = 2 -> DECTABSR DCS + Q Pt ST - Request resource values (XTGETXRES), xterm. The string fol- - lowing the "Q" is a list of names encoded in hexadecimal (2 + Request resource values (XTGETXRES), xterm. The string + following the "Q" is a list of names encoded in hexadecimal (2 digits per character) separated by ; which correspond to xterm resource names. Only boolean, numeric and string resources are supported by this query. @@ -442,23 +445,23 @@ DCS + Q Pt ST the value of the corresponding resource that xterm is using, or DCS 0 + R Pt ST for invalid requests. - The strings are encoded in hexadecimal (2 digits per charac- - ter). + The strings are encoded in hexadecimal (2 digits per + character). DCS + p Pt ST - Set Termcap/Terminfo Data (XTSETTCAP), xterm. The string fol- - lowing the "p" is a name to use for retrieving data from the - terminal database. The data will be used for the "tcap" key- - board configuration's function- and special-keys, as well as - by the Request Termcap/Terminfo String control. + Set Termcap/Terminfo Data (XTSETTCAP), xterm. 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 (XTGETTCAP), xterm. The - 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. + 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. A few special features are also recognized, which are not key names: @@ -467,16 +470,16 @@ DCS + q Pt ST o TN for termcap name (or name for terminfo name). o RGB for the ncurses direct-color extension. - Only a terminfo name is provided, since termcap applica- - tions cannot use this information. + Only a terminfo name is provided, since termcap + applications cannot use this information. 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. - The strings are encoded in hexadecimal (2 digits per charac- - ter). + The strings are encoded in hexadecimal (2 digits per + character). Functions using CSI , ordered by the final character(s) @@ -538,13 +541,31 @@ CSI Ps M Delete Ps Line(s) (default = 1) (DL). CSI Ps P Delete Ps Character(s) (default = 1) (DCH). +CSI # P +CSI Pm # P + Push current dynamic- and ANSI-palette colors onto stack + (XTPUSHCOLORS), xterm. Parameters (integers in the range 1 + through 10, since the default 0 will push) may be used to + store the palette into the stack without pushing. + +CSI # Q +CSI Pm # Q + Pop stack to set dynamic- and ANSI-palette colors + (XTPOPCOLORS), xterm. Parameters (integers in the range 1 + through 10, since the default 0 will pop) may be used to + restore the palette from the stack without popping. + +CSI # R Report the current entry on the palette stack, and the number + of palettes stored on the stack, using the same form as + XTPOPCOLOR (default = 0) (XTREPORTCOLORS), xterm. + CSI Ps S Scroll up Ps lines (default = 1) (SU), VT420, ECMA-48. CSI ? Pi ; Pa ; Pv S - Set or request graphics attribute, xterm. 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: + Set or request graphics attribute (XTSMGRAPHICS), xterm. 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 is number of color registers. Pi = 2 -> item is Sixel graphics geometry (in pixels). @@ -555,7 +576,7 @@ CSI ? Pi ; Pa ; Pv S Pa = 3 -> set to value in Pv. Pa = 4 -> read the maximum allowed value. - Pv can be omitted except when setting (Pa == 3 ). + Pv is ignored by xterm except when setting (Pa == 3 ). Pv = n <- A single integer is used for color registers. Pv = width ; height <- Two integers for graphics geometry. @@ -587,19 +608,19 @@ CSI ? Pi ; Pa ; Pv S CSI Ps T Scroll down Ps lines (default = 1) (SD), VT420. CSI Ps ; Ps ; Ps ; Ps ; Ps T - Initiate highlight mouse tracking. Parameters are - [func;startx;starty;firstrow;lastrow]. See the section Mouse - Tracking. + Initiate highlight mouse tracking (XTHIMOUSE), xterm. + Parameters are [func;startx;starty;firstrow;lastrow]. See the + section Mouse Tracking. CSI > Pm T - Reset title mode features to default value, xterm. 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. + Reset title mode features to default value (XTRMTITLE), xterm. + 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 hexadeci- - mal. + 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. @@ -610,13 +631,13 @@ CSI Ps X Erase Ps Character(s) (default = 1) (ECH). CSI Ps Z Cursor Backward Tabulation Ps tab stops (default = 1) (CBT). CSI Ps ^ Scroll down Ps lines (default = 1) (SD), ECMA-48. - This was a publication error in the original ECMA-48 5th edi- - tion (1991) corrected in 2003. + This was a publication error in the original ECMA-48 5th + edition (1991) corrected in 2003. -CSI Pm ` Character Position Absolute [column] (default = [row,1]) +CSI Ps ` Character Position Absolute [column] (default = [row,1]) (HPA). -CSI Pm a Character Position Relative [columns] (default = [row,col+1]) +CSI Ps a Character Position Relative [columns] (default = [row,col+1]) (HPR). CSI Ps b Repeat the preceding graphic character Ps times (REP). @@ -626,10 +647,13 @@ CSI Ps c Send Device Attributes (Primary DA). response depends on the decTerminalID resource setting. -> CSI ? 1 ; 2 c ("VT100 with Advanced Video Option") -> CSI ? 1 ; 0 c ("VT101 with No Options") + -> CSI ? 4 ; 6 c ("VT132 with Advanced Video and Graphics") -> CSI ? 6 c ("VT102") - -> CSI ? 6 2 ; Psc ("VT220") - -> CSI ? 6 3 ; Psc ("VT320") - -> CSI ? 6 4 ; Psc ("VT420") + -> CSI ? 7 c ("VT131") + -> CSI ? 1 2 ; Ps c ("VT125") + -> CSI ? 6 2 ; Ps c ("VT220") + -> CSI ? 6 3 ; Ps c ("VT320") + -> CSI ? 6 4 ; Ps c ("VT420") The VT100-style response parameters do not mean anything by themselves. VT220 (and higher) parameters do, telling the @@ -653,10 +677,10 @@ CSI Ps c Send Device Attributes (Primary DA). XTerm supports part of the User windows feature, providing a single page (which corresponds to its visible window). Rather than resizing the font to change the number of lines/columns - in a fixed-size display, xterm uses the window extension con- - trols (DECSNLS, DECSCPP, DECSLPP) to adjust its visible win- - dow's size. The "cursor coupling" controls (DECHCCM, DECPCCM, - DECVCCM) are ignored. + in a fixed-size display, xterm uses the window extension + controls (DECSNLS, DECSCPP, DECSLPP) to adjust its visible + window's size. The "cursor coupling" controls (DECHCCM, + DECPCCM, DECVCCM) are ignored. CSI = Ps c Send Device Attributes (Tertiary DA). @@ -667,30 +691,31 @@ CSI = Ps c CSI > Ps c Send Device Attributes (Secondary DA). Ps = 0 or omitted -> request the terminal's identification - code. The response depends on the decTerminalID resource set- - ting. It should apply only to VT220 and up, but xterm extends - this to VT100. + code. The response depends on the decTerminalID resource + setting. It should apply only to VT220 and up, but xterm + extends this to VT100. -> CSI > Pp ; Pv ; Pc c where Pp denotes the terminal type Pp = 0 -> "VT100". Pp = 1 -> "VT220". - Pp = 2 -> "VT240". + Pp = 2 -> "VT240" or "VT241". Pp = 1 8 -> "VT330". Pp = 1 9 -> "VT340". Pp = 2 4 -> "VT320". + Pp = 3 2 -> "VT382". Pp = 4 1 -> "VT420". Pp = 6 1 -> "VT510". Pp = 6 4 -> "VT520". Pp = 6 5 -> "VT525". and Pv is the firmware version (for xterm, this was originally - the XFree86 patch number, starting with 95). In a DEC termi- - nal, Pc indicates the ROM cartridge registration number and is - always zero. + the XFree86 patch number, starting with 95). In a DEC + terminal, Pc indicates the ROM cartridge registration number + and is always zero. -CSI Pm d Line Position Absolute [row] (default = [1,column]) (VPA). +CSI Ps d Line Position Absolute [row] (default = [1,column]) (VPA). -CSI Pm e Line Position Relative [rows] (default = [row+1,column]) +CSI Ps e Line Position Relative [rows] (default = [row+1,column]) (VPR). CSI Ps ; Ps f @@ -702,7 +727,7 @@ CSI Ps g Tab Clear (TBC). Ps = 3 -> Clear All. CSI Pm h Set Mode (SM). - Ps = 2 -> Keyboard Action Mode (AM). + Ps = 2 -> Keyboard Action Mode (KAM). Ps = 4 -> Insert Mode (IRM). Ps = 1 2 -> Send/receive (SRM). Ps = 2 0 -> Automatic Newline (LNM). @@ -716,34 +741,38 @@ CSI ? Pm h Ps = 4 -> Smooth (Slow) Scroll (DECSCLM), VT100. Ps = 5 -> Reverse Video (DECSCNM), VT100. Ps = 6 -> Origin Mode (DECOM), VT100. - Ps = 7 -> Auto-wrap Mode (DECAWM), VT100. - Ps = 8 -> Auto-repeat Keys (DECARM), VT100. - Ps = 9 -> Send Mouse X & Y on button press. See the sec- - tion Mouse Tracking. This is the X10 xterm mouse protocol. + Ps = 7 -> Auto-Wrap Mode (DECAWM), VT100. + Ps = 8 -> Auto-Repeat Keys (DECARM), VT100. + Ps = 9 -> Send Mouse X & Y on button press. See the + section Mouse Tracking. This is the X10 xterm mouse protocol. Ps = 1 0 -> Show toolbar (rxvt). - Ps = 1 2 -> Start Blinking Cursor (AT&T 610). - Ps = 1 3 -> Start Blinking Cursor (set only via resource or + Ps = 1 2 -> Start blinking cursor (AT&T 610). + Ps = 1 3 -> Start blinking cursor (set only via resource or menu). - Ps = 1 4 -> Enable XOR of Blinking Cursor control sequence + Ps = 1 4 -> Enable XOR of blinking cursor control sequence and menu. - Ps = 1 8 -> Print form feed (DECPFF), VT220. + Ps = 1 8 -> Print Form Feed (DECPFF), VT220. Ps = 1 9 -> Set print extent to full screen (DECPEX), VT220. - Ps = 2 5 -> Show Cursor (DECTCEM), VT220. + Ps = 2 5 -> Show cursor (DECTCEM), VT220. Ps = 3 0 -> Show scrollbar (rxvt). Ps = 3 5 -> Enable font-shifting functions (rxvt). - Ps = 3 8 -> Enter Tektronix Mode (DECTEK), VT240, xterm. - Ps = 4 0 -> Allow 80 -> 132 Mode, xterm. + Ps = 3 8 -> Enter Tektronix mode (DECTEK), VT240, xterm. + Ps = 4 0 -> Allow 80 -> 132 mode, xterm. Ps = 4 1 -> more(1) fix (see curses resource). Ps = 4 2 -> Enable National Replacement Character sets (DECNRCM), VT220. - Ps = 4 4 -> Turn On Margin Bell, xterm. - Ps = 4 5 -> Reverse-wraparound Mode, xterm. - Ps = 4 6 -> Start Logging, xterm. This is normally dis- - abled by a compile-time option. + Ps = 4 3 -> Enable Graphics Expanded Print Mode (DECGEPM). + Ps = 4 4 -> Turn on margin bell, xterm. + Ps = 4 4 -> Enable Graphics Print Color Mode (DECGPCM). + Ps = 4 5 -> Reverse-wraparound mode, xterm. + Ps = 4 5 -> Enable Graphics Print ColorSpace (DECGPCS). + Ps = 4 6 -> Start logging, xterm. This is normally + disabled by a compile-time option. Ps = 4 7 -> Use Alternate Screen Buffer, xterm. This may be disabled by the titeInhibit resource. - Ps = 6 6 -> Application keypad (DECNKM), VT320. + Ps = 4 7 -> Enable Graphics Rotated Print Mode (DECGRPM). + Ps = 6 6 -> Application keypad mode (DECNKM), VT320. Ps = 6 7 -> Backarrow key sends backspace (DECBKM), VT340, VT420. This sets the backarrowKey resource to "true". Ps = 6 9 -> Enable left and right margin mode (DECLRMM), @@ -769,11 +798,12 @@ CSI ? Pm h Ps = 1 0 1 1 -> Scroll to bottom on key press (rxvt). This sets the scrollKey resource to "true". Ps = 1 0 1 5 -> Enable urxvt Mouse Mode. + Ps = 1 0 1 6 -> Enable SGR Mouse PixelMode, xterm. Ps = 1 0 3 4 -> Interpret "meta" key, xterm. This sets the eighth bit of keyboard input (and enables the eightBitInput resource). - Ps = 1 0 3 5 -> Enable special modifiers for Alt and Num- - Lock keys, xterm. This enables the numLock resource. + Ps = 1 0 3 5 -> Enable special modifiers for Alt and + NumLock keys, xterm. This enables the numLock resource. Ps = 1 0 3 6 -> Send ESC when Meta modifies a key, xterm. This enables the metaSendsEscape resource. Ps = 1 0 3 7 -> Send DEL from the editing-keypad Delete @@ -789,18 +819,18 @@ CSI ? Pm h resource. Ps = 1 0 4 3 -> Enable raising of the window when Control-G is received, xterm. This enables the popOnBell resource. - Ps = 1 0 4 4 -> Reuse the most recent data copied to CLIP- - BOARD, xterm. This enables the keepClipboard resource. + Ps = 1 0 4 4 -> Reuse the most recent data copied to + CLIPBOARD, xterm. This enables the keepClipboard resource. Ps = 1 0 4 6 -> Enable switching to/from Alternate Screen - Buffer, xterm. This works for terminfo-based systems, updat- - ing the titeInhibit resource. + Buffer, xterm. This works for terminfo-based systems, + updating the titeInhibit resource. Ps = 1 0 4 7 -> Use Alternate Screen Buffer, xterm. This may be disabled by the titeInhibit resource. Ps = 1 0 4 8 -> Save cursor as in DECSC, xterm. This may be disabled by the titeInhibit resource. - Ps = 1 0 4 9 -> Save cursor as in DECSC, xterm. After sav- - ing the cursor, switch to the Alternate Screen Buffer, clear- - ing it first. This may be disabled by the titeInhibit + Ps = 1 0 4 9 -> Save cursor as in DECSC, xterm. After + saving the cursor, switch to the Alternate Screen Buffer, + clearing it first. This may be disabled by the titeInhibit resource. This control combines the effects of the 1 0 4 7 and 1 0 4 8 modes. Use this with terminfo-based applications rather than the 4 7 mode. @@ -814,14 +844,14 @@ CSI ? Pm h Ps = 1 0 6 1 -> Set VT220 keyboard emulation, xterm. Ps = 2 0 0 4 -> Set bracketed paste mode, xterm. -CSI Pm i Media Copy (MC). +CSI Ps i Media Copy (MC). Ps = 0 -> Print screen (default). Ps = 4 -> Turn off printer controller mode. Ps = 5 -> Turn on printer controller mode. Ps = 1 0 -> HTML screen dump, xterm. Ps = 1 1 -> SVG screen dump, xterm. -CSI ? Pm i +CSI ? Ps i Media Copy (MC), DEC-specific. Ps = 1 -> Print line containing cursor. Ps = 4 -> Turn off autoprint mode. @@ -830,7 +860,7 @@ CSI ? Pm i Ps = 1 1 -> Print all pages. CSI Pm l Reset Mode (RM). - Ps = 2 -> Keyboard Action Mode (AM). + Ps = 2 -> Keyboard Action Mode (KAM). Ps = 4 -> Replace Mode (IRM). Ps = 1 2 -> Send/receive (SRM). Ps = 2 0 -> Normal Linefeed (LNM). @@ -843,37 +873,42 @@ CSI ? Pm l Ps = 4 -> Jump (Fast) Scroll (DECSCLM), VT100. Ps = 5 -> Normal Video (DECSCNM), VT100. Ps = 6 -> Normal Cursor Mode (DECOM), VT100. - Ps = 7 -> No Auto-wrap Mode (DECAWM), VT100. - Ps = 8 -> No Auto-repeat Keys (DECARM), VT100. + Ps = 7 -> No Auto-Wrap Mode (DECAWM), VT100. + Ps = 8 -> No Auto-Repeat Keys (DECARM), VT100. Ps = 9 -> Don't send Mouse X & Y on button press, xterm. Ps = 1 0 -> Hide toolbar (rxvt). - Ps = 1 2 -> Stop Blinking Cursor (AT&T 610). - Ps = 1 3 -> Disable Blinking Cursor (reset only via + Ps = 1 2 -> Stop blinking cursor (AT&T 610). + Ps = 1 3 -> Disable blinking cursor (reset only via resource or menu). - Ps = 1 4 -> Disable XOR of Blinking Cursor control sequence + Ps = 1 4 -> Disable XOR of blinking cursor control sequence and menu. - Ps = 1 8 -> Don't print form feed (DECPFF). - Ps = 1 9 -> Limit print to scrolling region (DECPEX). - Ps = 2 5 -> Hide Cursor (DECTCEM), VT220. + Ps = 1 8 -> Don't Print Form Feed (DECPFF), VT220. + Ps = 1 9 -> Limit print to scrolling region (DECPEX), + VT220. + Ps = 2 5 -> Hide cursor (DECTCEM), VT220. Ps = 3 0 -> Don't show scrollbar (rxvt). Ps = 3 5 -> Disable font-shifting functions (rxvt). - Ps = 4 0 -> Disallow 80 -> 132 Mode, xterm. + Ps = 4 0 -> Disallow 80 -> 132 mode, xterm. Ps = 4 1 -> No more(1) fix (see curses resource). Ps = 4 2 -> Disable National Replacement Character sets (DECNRCM), VT220. - Ps = 4 4 -> Turn Off Margin Bell, xterm. - Ps = 4 5 -> No Reverse-wraparound Mode, xterm. - Ps = 4 6 -> Stop Logging, xterm. This is normally disabled + Ps = 4 3 -> Disable Graphics Expanded Print Mode (DECGEPM). + Ps = 4 4 -> Turn off margin bell, xterm. + Ps = 4 4 -> Disable Graphics Print Color Mode (DECGPCM). + Ps = 4 5 -> No Reverse-wraparound mode, xterm. + Ps = 4 5 -> Disable Graphics Print ColorSpace (DECGPCS). + Ps = 4 6 -> Stop logging, xterm. This is normally disabled by a compile-time option. Ps = 4 7 -> Use Normal Screen Buffer, xterm. - Ps = 6 6 -> Numeric keypad (DECNKM), VT320. + Ps = 4 7 -> Disable Graphics Rotated Print Mode (DECGRPM). + Ps = 6 6 -> Numeric keypad mode (DECNKM), VT320. Ps = 6 7 -> Backarrow key sends delete (DECBKM), VT340, VT420. This sets the backarrowKey resource to "false". Ps = 6 9 -> Disable left and right margin mode (DECLRMM), VT420 and up. Ps = 8 0 -> Disable Sixel Scrolling (DECSDM). - Ps = 9 5 -> Clear screen when DECCOLM is set/reset (DEC- - NCSM), VT510 and up. + Ps = 9 5 -> Clear screen when DECCOLM is set/reset + (DECNCSM), VT510 and up. Ps = 1 0 0 0 -> Don't send Mouse X & Y on button press and release. See the section Mouse Tracking. Ps = 1 0 0 1 -> Don't use Hilite Mouse Tracking, xterm. @@ -891,10 +926,11 @@ CSI ? Pm l Ps = 1 0 1 1 -> Don't scroll to bottom on key press (rxvt). This sets the scrollKey resource to "false". Ps = 1 0 1 5 -> Disable urxvt Mouse Mode. + Ps = 1 0 1 6 -> Disable SGR Mouse Pixel-Mode, xterm. Ps = 1 0 3 4 -> Don't interpret "meta" key, xterm. This disables the eightBitInput resource. - Ps = 1 0 3 5 -> Disable special modifiers for Alt and Num- - Lock keys, xterm. This disables the numLock resource. + Ps = 1 0 3 5 -> Disable special modifiers for Alt and + NumLock keys, xterm. This disables the numLock resource. Ps = 1 0 3 6 -> Don't send ESC when Meta modifies a key, xterm. This disables the metaSendsEscape resource. Ps = 1 0 3 7 -> Send VT220 Remove from the editing-keypad @@ -911,10 +947,10 @@ CSI ? Pm l Ps = 1 0 4 3 -> Disable raising of the window when Control- G is received, xterm. This disables the popOnBell resource. Ps = 1 0 4 6 -> Disable switching to/from Alternate Screen - Buffer, xterm. This works for terminfo-based systems, updat- - ing the titeInhibit resource. If currently using the Alter- - nate Screen Buffer, xterm switches to the Normal Screen Buf- - fer. + Buffer, xterm. This works for terminfo-based systems, + updating the titeInhibit resource. If currently using the + Alternate Screen Buffer, xterm switches to the Normal Screen + Buffer. Ps = 1 0 4 7 -> Use Normal Screen Buffer, xterm. Clear the screen first if in the Alternate Screen Buffer. This may be disabled by the titeInhibit resource. @@ -980,8 +1016,8 @@ CSI Pm m Character Attributes (SGR). listed codes through 6 5 (skipping several toward the end of the range). Most of the ECMA-48 codes not implemented in xterm were never implemented in a hardware terminal. Several - (such as 3 9 and 4 9 ) are either noted in ECMA-48 as imple- - mentation defined, or described in vague terms. + (such as 3 9 and 4 9 ) are either noted in ECMA-48 as + implementation defined, or described in vague terms. The successive editions of ECMA-48 give little attention to changes from one edition to the next, except to comment on @@ -998,8 +1034,8 @@ CSI Pm m Character Attributes (SGR). known to differ from xterm; useful documentation on this series became available too late to influence xterm. - If 16-color support is compiled, the following aixterm con- - trols apply. Assume that xterm's resources are set so that + If 16-color support is compiled, the following aixterm + controls 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: @@ -1030,48 +1066,58 @@ CSI Pm m Character Attributes (SGR). is compiled, the following apply: o All parameters are decimal integers. o RGB values range from zero (0) to 255. - o ISO-8613-6 has been interpreted in more than one way; - xterm allows the semicolons separating the subparameters - in this control to be replaced by colons (but after the + o The 88- and 256-color support uses subparameters described + in ISO-8613-6 for indexed color. ISO-8613-6 also mentions + direct color, using a similar scheme. xterm supports + that, too. + o xterm allows either colons (standard) or semicolons + (legacy) to separate the subparameters (but after the first colon, colons must be used). + The indexed- and direct-color features are summarized in the + FAQ, which explains why semicolon is accepted as a + subparameter delimiter: + + Can I set a color by its number? + + These ISO-8613-6 controls (marked in ECMA-48 5th edition as "reserved for future standardization") are supported by xterm: - Pm = 3 8 ; 2 ; Pi ; Pr ; Pg ; Pb -> Set foreground color + Ps = 3 8 : 2 : Pi : Pr : Pg : Pb -> Set foreground color using RGB values. If xterm is not compiled with direct-color support, it uses the closest match in its palette for the given RGB Pr/Pg/Pb. The color space identifier Pi is ignored. - Pm = 3 8 ; 5 ; Ps -> Set foreground color to Ps, using + Ps = 3 8 : 5 : Ps -> Set foreground color to Ps, using indexed color. - Pm = 4 8 ; 2 ; Pi ; Pr ; Pg ; Pb -> Set background color + Ps = 4 8 : 2 : Pi : Pr : Pg : Pb -> Set background color using RGB values. If xterm is not compiled with direct-color support, it uses the closest match in its palette for the given RGB Pr/Pg/Pb. The color space identifier Pi is ignored. - Pm = 4 8 ; 5 ; Ps -> Set background color to Ps, using + Ps = 4 8 : 5 : Ps -> Set background color to Ps, using indexed color. This variation on ISO-8613-6 is supported for compatibility with KDE konsole: - Pm = 3 8 ; 2 ; Pr ; Pg ; Pb -> Set foreground color using - RGB values. If xterm is not compiled with direct-color sup- - port, it uses the closest match in its palette for the given - RGB Pr/Pg/Pb. - Pm = 4 8 ; 2 ; Pr ; Pg ; Pb -> Set background color using - RGB values. If xterm is not compiled with direct-color sup- - port, it uses the closest match in its palette for the given - RGB Pr/Pg/Pb. + Ps = 3 8 ; 2 ; Pr ; Pg ; Pb -> Set foreground color using + RGB values. If xterm is not compiled with direct-color + support, it uses the closest match in its palette for the + given RGB Pr/Pg/Pb. + Ps = 4 8 ; 2 ; Pr ; Pg ; Pb -> Set background color using + RGB values. If xterm is not compiled with direct-color + support, it uses the closest match in its palette for the + given RGB Pr/Pg/Pb. In each case, if xterm is compiled with direct-color support, - and the resource directColor is true, then rather than choos- - ing the closest match, xterm asks the X server to directly - render a given color. + and the resource directColor is true, then rather than + choosing the closest match, xterm asks the X server to + directly render a given color. CSI > Pp ; Pv m CSI > Pp m - Set/reset key modifier options, xterm. 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. + Set/reset key modifier options (XTMODKEYS), xterm. 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 Pp identifies the resource to set/reset. The second parameter Pv is the value to assign to the @@ -1095,10 +1141,10 @@ CSI Ps n Device Status Report (DSR). Ps = 6 -> Report Cursor Position (CPR) [row;column]. Result is CSI r ; c R - Note: it is possible for this sequence to be sent by a func- - tion key. For example, with the default keyboard configura- - tion the shifted F1 key may send (with shift-, control-, alt- - modifiers) + 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) CSI 1 ; 2 R , or CSI 1 ; 5 R , or @@ -1110,7 +1156,7 @@ CSI Ps n Device Status Report (DSR). can change the form of the string sent from the modified F1 key. -CSI > Pm n +CSI > Ps n Disable key modifier options, xterm. These modifiers may be enabled via the CSI > Pm m sequence. This control sequence corresponds to a resource value of "-1", which cannot be set @@ -1126,8 +1172,8 @@ CSI > Pm n If the parameter is omitted, modifyFunctionKeys is disabled. When modifyFunctionKeys is disabled, xterm uses the modifier keys to make an extended sequence of function keys rather than - adding a parameter to each function key to denote the modi- - fiers. + adding a parameter to each function key to denote the + modifiers. CSI ? Ps n Device Status Report (DSR, DEC-specific). @@ -1155,12 +1201,12 @@ CSI ? Ps n 3 n Locator available, if compiled-in, or CSI ? 5 0 n No Locator, if not. Ps = 5 6 -> Report Locator type. The response is CSI ? 5 7 - ; 1 n Mouse, if compiled-in, or CSI ? 5 7 ; 0 n Cannot iden- - tify, if not. + ; 1 n Mouse, if compiled-in, or CSI ? 5 7 ; 0 n Cannot + identify, if not. Ps = 6 2 -> Report macro space (DECMSR). The response is CSI Pn * { . - Ps = 6 3 -> Report memory checksum (DECCKSR). The response - is DCS Pt ! x x x x ST . + Ps = 6 3 -> Report memory checksum (DECCKSR), VT420 and up. + The response is DCS Pt ! ~ x x x x ST . Pt is the request id (from an optional parameter to the request). The x's are hexadecimal digits 0-9 and A-F. @@ -1171,8 +1217,9 @@ CSI ? Ps n operation). CSI > Ps p - Set resource value pointerMode. This is used by xterm to - decide whether to hide the pointer cursor as the user types. + Set resource value pointerMode (XTSMPOINTER), xterm. 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. @@ -1189,8 +1236,8 @@ CSI ! p Soft terminal reset (DECSTR), VT220 and up. CSI Pl ; Pc " p Set conformance level (DECSCL), VT220 and up. - The first parameter selects the conformance level. Valid val- - ues are: + The first parameter selects the conformance level. Valid + values are: Pl = 6 1 -> level 1, e.g., VT100. Pl = 6 2 -> level 2, e.g., VT200. Pl = 6 3 -> level 3, e.g., VT300. @@ -1209,7 +1256,7 @@ CSI Pl ; Pc " p CSI Ps $ p Request ANSI mode (DECRQM). For VT300 and up, reply DECRPM is - CSI Ps; Pm$ y + CSI Ps; Pm $ y where Ps is the mode number as in SM/RM, and Pm is the mode value: 0 - not recognized @@ -1221,18 +1268,23 @@ CSI Ps $ p CSI ? Ps $ p Request DEC private mode (DECRQM). For VT300 and up, reply DECRPM is - CSI ? Ps; Pm$ y + CSI ? Ps; Pm $ y where Ps is the mode number as in DECSET/DECSET, Pm is the mode value as in the ANSI DECRQM. - Two private modes are read-only (i.e., 1 3 and 1 4 ), pro- - vided only for reporting their values using this control + Two private modes are read-only (i.e., 1 3 and 1 4 ), + provided only for reporting their values using this control sequence. They correspond to the resources cursorBlink and cursorBlinkXOR. CSI # p CSI Pm # p Push video attributes onto stack (XTPUSHSGR), xterm. This is - an alias for CSI # { , used to work around language limita- - tions of C#. + an alias for CSI # { , used to work around language + limitations of C#. + +CSI > Ps q + Ps = 0 -> Report xterm name and version (XTVERSION). The + response is a DSR sequence identifying the version: DCS > | + text ST CSI Ps q Load LEDs (DECLL), VT100. Ps = 0 -> Clear all LEDS (default). @@ -1254,8 +1306,8 @@ CSI Ps SP q Ps = 6 -> steady bar, xterm. CSI Ps " q - Select character protection attribute (DECSCA). Valid values - for the parameter: + Select character protection attribute (DECSCA), VT220. 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. @@ -1265,12 +1317,13 @@ CSI # q Pop video attributes from stack (XTPOPSGR), xterm. This is an of C#. CSI Ps ; Ps r - Set Scrolling Region [top;bottom] (default = full size of win- - dow) (DECSTBM), VT100. + Set Scrolling Region [top;bottom] (default = full size of + window) (DECSTBM), VT100. CSI ? Pm r - Restore DEC Private Mode Values. The value of Ps previously - saved is restored. Ps values are the same as for DECSET. + Restore DEC Private Mode Values (XTRESTORE), xterm. The value + of Ps previously saved is restored. Ps values are the same as + for DECSET. CSI Pt ; Pl ; Pb ; Pr ; Ps $ r Change Attributes in Rectangular Area (DECCARA), VT400 and up. @@ -1284,20 +1337,37 @@ CSI Pl ; Pr s Set left and right margins (DECSLRM), VT420 and up. This is available only when DECLRMM is enabled. +CSI > Ps s + Set/reset shift-escape options (XTSHIFTESCAPE), xterm. This + corresponds to the shiftEscape resource. + + Valid values for the parameter: + Ps = 0 -> allow shift-key to override mouse protocol. + Ps = 1 -> conditionally allow shift-key as modifier in + mouse protocol. + + These resource values are disallowed in the control sequence: + Ps = 2 -> always allow shift-key as modifier in mouse + protocol. + Ps = 3 -> never allow shift-key as modifier in mouse + protocol. + + If no parameter is given, xterm uses the default, which is 0 . + CSI ? Pm s - Save DEC Private Mode Values. Ps values are the same as for - DECSET. + Save DEC Private Mode Values (XTSAVE), xterm. Ps values are + the same as for DECSET. CSI Ps ; Ps ; Ps t - Window manipulation (from dtterm, as well as extensions by - xterm). These controls may be disabled using the allowWin- - dowOps resource. + Window manipulation (XTWINOPS), dtterm, extended by xterm. + These controls may be disabled using the allowWindowOps + resource. xterm uses Extended Window Manager Hints (EWMH) to maximize the window. Some window managers have incomplete support for - EWMH. For instance, fvwm, flwm and quartz-wm advertise sup- - port for maximizing windows horizontally or vertically, but in - fact equate those to the maximize operation. + EWMH. For instance, fvwm, flwm and quartz-wm advertise + support for maximizing windows horizontally or vertically, but + in fact equate those to the maximize operation. Valid values for the first (and any additional parameters) are: @@ -1306,10 +1376,10 @@ CSI Ps ; Ps ; Ps t 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 dis- - play's height or width. - Ps = 5 -> Raise the xterm window to the front of the stack- - ing order. + 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. @@ -1339,8 +1409,8 @@ CSI Ps ; Ps ; Ps t Result is CSI 4 ; height ; width t Ps = 1 4 ; 2 -> Report xterm window size in pixels. Normally xterm's window is larger than its text area, since it - includes the frame (or decoration) applied by the window man- - ager, as well as the area used by a scroll-bar. + includes the frame (or decoration) applied by the window + manager, as well as the area used by a scroll-bar. Result is CSI 4 ; height ; width t Ps = 1 5 -> Report size of the screen in pixels. Result is CSI 5 ; height ; width t @@ -1366,12 +1436,13 @@ CSI Ps ; Ps ; Ps t CSI > Pm t This xterm control sets one or more features of the title - modes. Each parameter enables a single feature. + modes (XTSMTITLE), xterm. 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 dis- - cussion of Title Modes) + Ps = 3 -> Query window/icon labels using UTF-8. (See + discussion of Title Modes) CSI Ps SP t Set warning-bell volume (DECSWBV), VT520. @@ -1422,9 +1493,9 @@ CSI Pt ; Pl ; Pb ; Pr ' w 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 omit- - ted, any locator motion will be reported. DECELR always can- - cels any prevous rectangle definition. + to the current locator position. If all parameters are + omitted, any locator motion will be reported. DECELR always + cancels any previous rectangle definition. CSI Ps x Request Terminal Parameters (DECREQTPARM). if Ps is a "0" (default) or "1", and xterm is emulating VT100, @@ -1511,9 +1582,9 @@ CSI Pm # { Ps = 7 -> Inverse. Ps = 8 -> Invisible. Ps = 9 -> Crossed-out characters. - Ps = 1 0 -> Foreground color. - Ps = 1 1 -> Background color. Ps = 2 1 -> Doubly-underlined. + Ps = 3 0 -> Foreground color. + Ps = 3 1 -> Background color. If no parameters are given, all of the video attributes are saved. The stack is limited to 10 levels. @@ -1570,8 +1641,8 @@ CSI Ps ' | 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 deci- - mal. + locator position in the xterm window, encoded as ASCII + decimal. The "page" parameter is not used by xterm. CSI Ps * | @@ -1581,10 +1652,10 @@ CSI # } Pop video attributes from stack (XTPOPSGR), xterm. Popping restores the video-attributes which were saved using XTPUSHSGR to their previous state. -CSI Pm ' } +CSI Ps ' } Insert Ps Column(s) (default = 1) (DECIC), VT420 and up. -CSI Pm ' ~ +CSI Ps ' ~ Delete Ps Column(s) (default = 1) (DECDC), VT420 and up. @@ -1593,17 +1664,31 @@ Operating System Commands OSC Ps ; Pt BEL OSC Ps ; Pt ST - Set Text Parameters. For colors and font, if Pt is a "?", the - control sequence elicits a response which consists of the con- - trol sequence which would set the corresponding value. The - dtterm control sequences allow you to determine the icon name - and window title. + Set Text Parameters. Some control sequences return + information: + o 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. + o The dtterm control sequences allow you to determine the + icon name and window title. + + XTerm accepts either BEL or ST for terminating OSC + sequences, and when returning information, uses the same + terminator used in a query. While the latter is preferred, + the former is supported for legacy applications: + o Although documented in the changes for X.V10R4 (December + 1986), BEL as a string terminator dates from X11R4 + (December 1989). + o Since XFree86-3.1.2Ee (August 1996), xterm has accepted ST + (the documented string terminator in ECMA-48). + + Ps specifies the type of operation to perform: 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 prop- - erty. + 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. @@ -1618,10 +1703,11 @@ OSC Ps ; Pt ST 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 specifica- - tion as per XParseColor. Any number of c/spec pairs may be - given. The special colors can also be set by adding the maxi- - mum number of colors to these codes in an OSC 4 control: + 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 OSC 4 + control: Pc = 0 <- resource colorBD (BOLD). Pc = 1 <- resource colorUL (UNDERLINE). @@ -1635,17 +1721,18 @@ OSC Ps ; Pt ST as OSC 1 0 6 . The 10 colors (below) which may be set or queried using 1 0 - through 1 9 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 (however, the dynamic text fore- - ground and background colors are used when ANSI colors are - reset using SGR 3 9 and 4 9 , respectively). 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. + through 1 9 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 (however, + the dynamic text foreground and background colors are used + when ANSI colors are reset using SGR 3 9 and 4 9 , + respectively). 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 @@ -1657,16 +1744,16 @@ OSC Ps ; Pt ST Ps = 1 0 -> Change VT100 text foreground color to Pt. Ps = 1 1 -> Change VT100 text background color to Pt. Ps = 1 2 -> Change text cursor color to Pt. - Ps = 1 3 -> Change mouse foreground color to Pt. - Ps = 1 4 -> Change mouse background color to Pt. + Ps = 1 3 -> Change pointer foreground color to Pt. + Ps = 1 4 -> Change pointer background color to Pt. Ps = 1 5 -> Change Tektronix foreground color to Pt. Ps = 1 6 -> Change Tektronix background color to Pt. Ps = 1 7 -> Change highlight background color to Pt. Ps = 1 8 -> Change Tektronix cursor color to Pt. Ps = 1 9 -> Change highlight foreground color to Pt. - Ps = 4 6 -> Change Log File to Pt. This is normally dis- - abled by a compile-time option. + Ps = 4 6 -> Change Log File to Pt. This is normally + disabled by a compile-time option. Ps = 5 0 -> Set Font to Pt. These controls may be disabled using the allowFontOps resource. If Pt begins with a "#", @@ -1693,11 +1780,11 @@ OSC Ps ; Pt ST Pc ; Pd The first, Pc, may contain zero or more characters from the set c , p , q , s , 0 , 1 , 2 , 3 , 4 , 5 , 6 , and 7 . It is - used to construct a list of selection parameters for clip- - board, primary, secondary, select, or cut buffers 0 through 7 - respectively, in the order given. If the parameter is empty, - xterm uses s 0 , to specify the configurable primary/clipboard - selection and cut buffer 0. + used to construct a list of selection parameters for + clipboard, primary, secondary, select, or cut buffers 0 + through 7 respectively, in the order given. If the parameter + is empty, xterm uses s 0 , 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 (RFC-4648). The data @@ -1715,15 +1802,15 @@ OSC Ps ; Pt ST Ps = 1 0 4 ; 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 sup- - ported, the remainder of the 88-color or 256-color table. If - no parameters are given, the entire table will be reset. + 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 = 1 0 5 ; 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 corre- - spond to the special colors which can be set using an OSC 5 - control (or by adding the maximum number of colors using an + 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). Ps = 1 0 6 ; c ; f -> Enable/disable Special Color Number c. @@ -1742,8 +1829,8 @@ OSC Ps ; Pt ST 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 3 -> Reset pointer foreground color. + Ps = 1 1 4 -> Reset pointer 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. @@ -1805,14 +1892,16 @@ o When modifyOtherKeys is set to 2, all of the modifiers apply. For The formatOtherKeys resource tells n to change the format of the escape sequences sent when modifyOtherKeys applies. When modifyOtherKeys is set to 1, for example alt-Tab sends CSI 9 ; 3 u (changing the order of -parameters). One drawback to this format is that applications may con- -fuse it with CSI u (restore-cursor). +parameters). One drawback to this format is that applications may +confuse it with CSI u (restore-cursor). -The xterm FAQ section +The xterm FAQ sections How can my program distinguish control-I from tab? -goes into greater detail on this topic. + XTerm - "Other" Modified Keys + +go into greater detail on this topic. The table shows the result for a given character "x" with modifiers according to the default translations with the resources set on or off. @@ -1876,9 +1965,9 @@ also controlled by the DECCKM escape sequence: ---------+----------+------------- -The application keypad transmits the following escape sequences depend- -ing on the mode specified via the DECKPNM and DECKPAM escape sequences. -Use the NumLock key to override the application mode. +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. @@ -1911,8 +2000,8 @@ supported by the program. = (equal) | = | SS3 X | - | - ---------------+----------+-------------+----------+---------- -They also provide 12 function keys, as well as a few other special-pur- -pose keys: +They also provide 12 function keys, as well as a few other special- +purpose keys: Key Escape Sequence ---------+----------------- @@ -1934,9 +2023,9 @@ pose keys: Note that F1 through F4 are prefixed with SS3 , while the other keys are prefixed with CSI . Older versions of xterm implement different escape sequences for F1 through F4, with a CSI prefix. These can be activated -by setting the oldXtermFKeys resource. However, since they do not cor- -respond to any hardware terminal, they have been deprecated. (The DEC -VT220 reserves F1 through F5 for local functions such as Setup). +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). Key Escape Sequence ---------+----------------- @@ -1949,8 +2038,8 @@ VT220 reserves F1 through F5 for local functions such as Setup). In normal mode, i.e., a Sun/PC keyboard when the sunKeyboard resource is false (and none of the other keyboard resources such as oldXtermFKeys resource is set), xterm encodes function key modifiers as parameters -appended before the final character of the control sequence. As a spe- -cial case, the SS3 sent before F1 through F4 is altered to CSI when +appended before the final character of the control sequence. As a +special case, the SS3 sent before F1 through F4 is altered to CSI when sending a function key modifier as a parameter. Code Modifiers @@ -1974,34 +2063,34 @@ sending a function key modifier as a parameter. For example, shift-F5 would be sent as CSI 1 5 ; 2 ~ -If the alwaysUseMods resource is set, the Meta modifier also is recog- -nized, making parameters 9 through 16. +If the alwaysUseMods resource is set, the Meta modifier also is +recognized, making parameters 9 through 16. The codes used for the PC-style function keys were inspired by a feature of the VT510, referred to in its reference manual as DECFNK. In the -DECFNK scheme, codes 2-8 identify modifiers for function-keys and cur- -sor-, editing-keypad keys. Unlike xterm, the VT510 limits the modifiers -which can be used with cursor- and editing-keypad keys. Although the -name "DECFNK" implies that it is a mode, the VT510 manual mentions it -only as a feature, which (like xterm) interacts with the DECUDK feature. -Unlike xterm, VT510/VT520 provide an extension to DECUDK (DECPFK and -DECPAK) which apparently was the reason for the feature in those termi- -nals, i.e., for identifying a programmable key rather than making it -simple for applications to obtain modifier information. It is not -described in the related VT520 manual. Neither manual was readily -available at the time the feature was added to xterm. +DECFNK scheme, codes 2-8 identify modifiers for function-keys and +cursor-, editing-keypad keys. Unlike xterm, the VT510 limits the +modifiers which can be used with cursor- and editing-keypad keys. +Although the name "DECFNK" implies that it is a mode, the VT510 manual +mentions it only as a feature, which (like xterm) interacts with the +DECUDK feature. Unlike xterm, VT510/VT520 provide an extension to +DECUDK (DECPFK and DECPAK) which apparently was the reason for the +feature in those terminals, i.e., for identifying a programmable key +rather than making it simple for applications to obtain modifier +information. It is not described in the related VT520 manual. Neither +manual was readily available at the time the feature was added to xterm. On the other hand, the VT510 and VT520 reference manuals do document a related feature. That is its emulation of the SCO console, which is -similar to the "xterm-sco" terminal description. The SCO console func- -tion-keys are less useful to applications developers than the approach -used by xterm because +similar to the "xterm-sco" terminal description. The SCO console +function-keys are less useful to applications developers than the +approach used by xterm because -o the relationship between modifiers and the characters sent by func- - tion-keys is not readily apparent, and +o the relationship between modifiers and the characters sent by + function-keys is not readily apparent, and -o the scheme is not extensible, i.e., it is an ad hoc assignment lim- - ited to two modifiers (shift and control). +o the scheme is not extensible, i.e., it is an ad hoc assignment + limited to two modifiers (shift and control). VT220-Style Function Keys @@ -2011,8 +2100,8 @@ 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 key- -pad: +application mode, which are distinct from the cursor and scrolling +keypad: Key Numeric Application VT100? -------------+----------+-------------+---------- @@ -2043,14 +2132,14 @@ pad: -------------+----------+-------------+---------- -The VT100/VT220 keypad did not have all of those keys. They were imple- -mented in xterm in X11R1 (1987), defining a mapping of all X11 keys +The VT100/VT220 keypad did not have all of those keys. They were +implemented in xterm in X11R1 (1987), defining a mapping of all X11 keys which might be provided on a keypad. For instance, a Sun4/II type-4 keyboard provided "=" (equal), "/" (divide), and "*" (multiply). While the VT420 provided the same keypad, the VT520 used a PC-keyboard. -Because that keyboard's keypad lacks the "," (comma), it was not possi- -ble to use EDT's delete-character function with the keypad. XTerm +Because that keyboard's keypad lacks the "," (comma), it was not +possible to use EDT's delete-character function with the keypad. XTerm solves that problem for the VT220-keyboard configuration by mapping Ctrl + to , and @@ -2167,15 +2256,15 @@ 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 ter- -minfo anyway, since terminfo data is not passed in environment vari- -ables; setting an environment variable in this manner would have no -effect on the application's ability to switch between Normal and Alter- -nate Screen buffers. Instead, the newer private mode controls (such as -1 0 4 9 ) for switching between Normal and Alternate Screen buffers sim- -ply disable the switching. They add other features such as clearing the -display for the same reason: to make the details of switching indepen- -dent of the application that requests the switch. +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 1 0 4 9 ) 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 @@ -2194,9 +2283,9 @@ 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. +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 @@ -2221,9 +2310,10 @@ 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 -other full-screen applications that want to make use of the mouse. +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: @@ -2248,11 +2338,12 @@ as follows: #define SET_FOCUS_EVENT_MOUSE 1004 + #define SET_ALTERNATE_SCROLL 1007 + #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 + #define SET_PIXEL_POSITION_MOUSE 1016 The motion reporting modes are strictly xterm extensions, and are not part of any standard, though they are analogous to the DEC VT200 DECELR @@ -2286,17 +2377,30 @@ 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 CSI M CbCxCy. -o The low two bits of Cb encode button information: 0=MB1 pressed, - 1=MB2 pressed, 2=MB3 pressed, 3=release. +o The low two bits of Cb encode button information: + + 0=MB1 pressed, + 1=MB2 pressed, + 2=MB3 pressed, and + 3=release. o The next three bits encode the modifiers which were down when the - button was pressed and are added together: 4=Shift, 8=Meta, 16=Con- - trol. 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 transla- - tions for button events. The Meta modifier recognized by xterm is - the mod1 mask, and is not necessarily the "Meta" key (see - xmodmap(1)). + button was pressed and are added together: + + 4=Shift, + 8=Meta, and + 16=Control. + + The shift and control modifiers are normally irrelevant because + xterm uses the control modifier with mouse for popup menus, and the + shift modifier is used in the default translations for button + events. + + There is no predefined meta modifier. XTerm checks first if the + keysyms listed in the predefined modifiers include Meta_L or Meta_R. + If found, xterm uses that modifier for meta. Next, it tries Alt_L + or Alt_R. If none of those are found, xterm uses the mod1 modifier, + This is not necessarily the "Meta" key according to xmodmap(1). o Cx and Cy are the x and y coordinates of the mouse event, encoded as in X10 mode. @@ -2307,26 +2411,36 @@ Wheel mice 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 dis- -playing the Alternate Screen Buffer. The initial state of Alternate -Scroll mode is set using the alternateScroll resource. +reported. + +By default, the wheel mouse events (buttons 4 and 5) are translated to +scroll-back and scroll-forw actions, respectively. 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 Buffer. +The initial state of Alternate Scroll mode is set using the +alternateScroll resource. Other buttons +Some wheel mice can send additional button events, e.g., by tilting the +scroll wheel left and right. + Additional buttons are encoded like the wheel mice, o by adding 64 (for buttons 6 and 7), or o by adding 128 (for buttons 8 through 11). -Past button 11, the encoding is ambiguous because the same code may cor- -respond to different button/modifier combinations. It is not possible -to use these buttons (6-11) in xterm's translations resource because -their names are not in the X Toolkit's symbol table. +Past button 11, the encoding is ambiguous because the same code may +correspond to different button/modifier combinations. + +It is not possible to use these buttons (6-11) in xterm's translations +resource because their names are not in the X Toolkit's symbol table. +However, applications can check for the reports, e.g., button 7 (left) +and button 6 (right) with a Logitech mouse. Highlight tracking @@ -2335,23 +2449,23 @@ 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 but- -ton events can be received. +DECSET. Highlighting is performed only for button 1, though other +button events can be received. Warning: this mode requires a cooperating program, else xterm will hang. -On button press, the same information as for normal tracking is gener- -ated; xterm then waits for the program to send mouse tracking informa- -tion. All X events are ignored until the proper escape sequence is -received from the pty: +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: CSI Ps ; Ps ; Ps ; Ps ; Ps T The parameters are func, startx, starty, firstrow, and lastrow: o func is non-zero to initiate highlight tracking and zero to abort. -o startx and starty give the starting x and y location for the high- - lighted region. +o startx and starty give the starting x and y location for the + highlighted region. o The ending location tracks the mouse, but will never be above row firstrow and will always be above row lastrow. (The top of the @@ -2370,8 +2484,8 @@ o otherwise: The parameters are startx, starty, endx, endy, mousex, and mousey: -o startx, starty, endx, and endy give the starting and ending charac- - ter positions of the region. +o startx, starty, endx, and endy give the starting and ending + character positions of the region. o mousex and mousey give the location of the mouse at button up, which may not be over a character. @@ -2426,17 +2540,17 @@ UTF-8 (1005) This enables UTF-8 encoding for Cx and Cy 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, posi- - tions greater than 95 generate "extra" bytes which will con- - fuse applications which do not treat their input as a UTF-8 - stream. Likewise, Cb will be UTF-8 encoded, to reduce confu- - sion with wheel mouse events. + 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, Cb 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 charac- - ter; applications which do treat their input as UTF-8 will - almost certainly be confused unless extended mouse mode is - active. + 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(1) unchanged, e.g., for locales using @@ -2465,8 +2579,8 @@ SGR (1006) released. The highlight tracking responses are also modified to an SGR- - like format, using the same SGR-style scheme and button-encod- - ings. + like format, using the same SGR-style scheme and button- + encodings. URXVT (1015) The normal mouse response is altered to use @@ -2482,17 +2596,21 @@ URXVT (1015) However, CSI M can be mistaken for DL (delete lines), while the highlight tracking CSI T can be mistaken for SD (scroll - down), and the Window manipulation controls. For these rea- - sons, the 1015 control is not recommended; it is not an - improvement over 1005. + down), and the Window manipulation controls. For these + reasons, the 1015 control is not recommended; it is not an + improvement over 1006. + +SGR-Pixels (1016) + Use the same mouse response format as the 1006 control, but + report position in pixels rather than character cells. 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. +decTerminalID or decGraphicsID resource, it supports Sixel Graphics +controls, a palleted bitmap graphics system using sets of six vertical +pixels as the basic element. CSI Ps c Send Device Attributes (Primary DA), xterm. xterm responds to Send Device Attributes (Primary DA) with these additional @@ -2526,8 +2644,8 @@ DCS Pa ; Pb ; Ph q Ps..Ps ST 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. +decTerminalID or decGraphicsID resource, it supports Remote Graphic +Instruction Set, a graphics description language. CSI Ps c Send Device Attributes (Primary DA), DEC graphics terminals, xterm. xterm responds to Send Device Attributes (Primary DA) @@ -2547,8 +2665,8 @@ DCS Pm p Pr..Pr ST Graphics Programming Chapter 1 Introduction to ReGIS - The ReGIS data device control string has one positional param- - eter with four possible values: + 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. @@ -2565,11 +2683,11 @@ plotting modes but does describe the commands to switch modes. Some of the sequences are specific to xterm. The Tektronix emulation was added in X10R4 (1986). The VT240, introduced two years earlier, -also supported Tektronix 4010/4014. Unlike xterm, the VT240 documenta- -tion implies (there is an obvious error in section 6.9 "Entering and -Exiting 4010/4014 Mode") that exiting back to ANSI mode is done by -resetting private mode 3 8 (DECTEK) rather than ESC ETX . A real Tek- -tronix 4014 would not respond to either. +also supported Tektronix 4010/4014. Unlike xterm, the VT240 +documentation implies (there is an obvious error in section 6.9 +"Entering and Exiting 4010/4014 Mode") that exiting back to ANSI mode is +done by resetting private mode 3 8 (DECTEK) rather than ESC ETX . A +real Tektronix 4014 would not respond to either. BEL Bell (Ctrl-G). @@ -2617,8 +2735,8 @@ OSC Ps ; Pt BEL 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 = 4 6 -> Change Log File to Pt. This is normally dis- - abled by a compile-time option. + Ps = 4 6 -> Change Log File to Pt. This is normally + disabled by a compile-time option. ESC ` Normal Z Axis and Normal (solid) Vectors. @@ -2703,24 +2821,24 @@ Further reading Technical manuals -Manuals for hardware terminals are more readily available than simi- -larly-detailed documentation for terminal emulators such as aixterm, +Manuals for hardware terminals are more readily available than +similarly-detailed documentation for terminal emulators such as aixterm, shelltool, dtterm. However long, the technical manuals have problems: -o DEC's manuals did not provide a comprehensive comparison of the fea- - tures in different model. +o DEC's manuals did not provide a comprehensive comparison of the + features in different model. Peter Sichel's Host Interface Functions Checklist spreadsheet is useful for noting which model introduced a given feature (although there are a few apparent errors such as the DECRQSS feature cited for VT320 whereas the technical manual omits it). -o Sometimes the manuals disagree. For example, DEC's standard docu- - ment (DEC STD 070) for terminals says that DECSCL performs a soft - reset (DECSTR), while the VT420 manual says it does a hard reset - (RIS). +o Sometimes the manuals disagree. For example, DEC's standard + document (DEC STD 070) for terminals says that DECSCL performs a + soft reset (DECSTR), while the VT420 manual says it does a hard + reset (RIS). o Sometimes the manuals are simply incorrect. For example, testing a DEC VT420 in 1996 showed that the documented code for a valid or @@ -2733,10 +2851,10 @@ o Sometimes the manuals are simply incorrect. For example, testing a o Not all details are clear even in DEC STD 070 (which is more than twice the length of the VT520 programmer's reference manual, and - almost three times longer than the VT420 reference manual). How- - ever, as an internal standards document, DEC STD 070 is more likely - to describe the actual behavior of DEC's terminals than the more - polished user's guides. + almost three times longer than the VT420 reference manual). + However, as an internal standards document, DEC STD 070 is more + likely to describe the actual behavior of DEC's terminals than the + more polished user's guides. That said, here are technical manuals which have been used in developing xterm. Not all were available initially. In August 1996 for instance, @@ -2804,18 +2922,18 @@ o 4014 and 4014-1 Computer Display Terminal Standards The DEC terminal family (VT100 through VT525) is upward-compatible, -using standards plus extensions, e.g., "private modes". Not all com- -monly-used features are standard. For example, scrolling regions are +using standards plus extensions, e.g., "private modes". Not all +commonly-used features are standard. For example, scrolling regions are not found in ECMA-48. Again, it is possible to find discrepancies in the standards: o The printed ECMA-48 5th edition (1991) and the first PDF produced for that edition (April 1998) state that SD (scroll down) ends with - 05/14, i.e., ^ , which disagrees with DEC's VT420 hardware implemen- - tation and DEC's manuals which use 05/04 T . (A few other terminals - such as AT&T 5620 and IBM 5151 also used 05/04, but the documenta- - tion and dates are lacking). + 05/14, i.e., ^ , which disagrees with DEC's VT420 hardware + implementation and DEC's manuals which use 05/04 T . (A few other + terminals such as AT&T 5620 and IBM 5151 also used 05/04, but the + documentation and dates are lacking). ECMA created a new PDF in April 2003 which changed that detail to use T , and later in 2008 provided PDFs of the earlier editions @@ -2845,44 +2963,44 @@ o DEC STD 070 Video Systems Reference Manual. Miscellaneous -A few hardware terminals survived into the 1990s only as terminal emula- -tors. Documentation for these and other terminal emulators which have -influenced xterm are generally available only in less-accessible and -less-detailed manual pages. +A few hardware terminals survived into the 1990s only as terminal +emulators. Documentation for these and other terminal emulators which +have influenced xterm are generally available only in less-accessible +and less-detailed manual pages. o XTerm supports control sequences for manipulating its window which - were implemented by Sun's shelltool program. This was part of Sun- - View (SunOS 3.0, 1986). The change-notes for xterm's resize program - in X10.4 (1986) mention its use of these "Sun tty emulation escape - sequences" for resizing the window. The X10.4 xterm program recog- - nized these sequences for resizing the terminal, except for the - iconfig/deiconfy pair. SunView also introduced the SIGWINCH signal, - used by the X10.4 xterm and mentioned in its CHANGES file: + were implemented by Sun's shelltool program. This was part of + SunView (SunOS 3.0, 1986). The change-notes for xterm's resize + program in X10.4 (1986) mention its use of these "Sun tty emulation + escape sequences" for resizing the window. The X10.4 xterm program + recognized these sequences for resizing the terminal, except for the + iconify/deiconify pair. SunView also introduced the SIGWINCH + signal, used by the X10.4 xterm and mentioned in its CHANGES file: The window size is passed to the operating system via TIOCSWINSZ (4.3) or TIOCSSIZE (sun). A SIGWINCH signal is sent if the vtXXX window is resized. While support for the Sun control-sequences remained in resize, the - next release of xterm (X11R1 in 1987) omitted the code for inter- - preting them. + next release of xterm (X11R1 in 1987) omitted the code for + interpreting them. Later, the SunView program was adapted for the OPEN LOOK environment introduced 1988-1990. Still later, in 1995, OPEN LOOK was abandoned in favor of CDE. The - CDE terminal emulator dtterm implemented those controls, with a cou- - ple of additions. + CDE terminal emulator dtterm implemented those controls, with a + couple of additions. Starting in July 1996, xterm re-implemented those control sequences (based on the dtterm manual pages) and further extended the group of window controls. - There were two sets of controls (CSI Ps[ ; Pm ; Pm]t , and OSC - PstextST ) implemented by shelltool, documented in appendix E of - both PHIGS Programming Manual (1992), and the unpublished X Window - System User's Guide (OPEN LOOK Edition) (1995). The CDE program - kept those, and added a few new ones. + There were two sets of controls (CSI Ps [ ; Pm ; Pm ] t , and OSC Ps + text ST ) implemented by shelltool, documented in appendix E of both + PHIGS Programming Manual (1992), and the unpublished X Window System + User's Guide (OPEN LOOK Edition) (1995). The CDE program kept + those, and added a few new ones. Code Sun CDE XTerm Description ----------------------------------------------------------------- @@ -2926,19 +3044,19 @@ o XTerm supports control sequences for manipulating its window which clarification of the details of the window operations relied upon vttest. -o The control sequences for saving/restoring the cursor and for sav- - ing/restoring "DEC Private Mode Values" may appear to be related - (since the "save" controls both end with s ), but that is coinciden- - tal. The latter was introduced in X10.4: +o The control sequences for saving/restoring the cursor and for + saving/restoring "DEC Private Mode Values" may appear to be related + (since the "save" controls both end with s ), but that is + coincidental. The latter was introduced in X10.4: - Most Dec Private mode settings can be save away internally using - \E[?ns, where n is the same number to set or reset the Dec + Most Dec Private mode settings can be saved away internally + using \E[?ns, where n is the same number to set or reset the Dec Private mode. The mode can be restored using \E[?nr. This can be used in termcap for vi, for example, to turn off saving of lines, but restore whatever the original state was on exit. - while the SCOSC/SCORC pair was added in 1995 by XFree86 (and docu- - mented long afterwards). + while the SCOSC/SCORC pair was added in 1995 by XFree86 (and + documented long afterwards). o The aixterm manual page gives the format of the control sequence for foreground and background colors 8-15, but does not specify what |