XXtteerrmm CCoonnttrrooll SSeeqquueenncceess _E_d_w_a_r_d _M_o_y University of California, Berkeley Revised by _S_t_e_p_h_e_n _G_i_l_d_e_a X Consortium (1994) _T_h_o_m_a_s _D_i_c_k_e_y XFree86 Project (1996) DDeeffiinniittiioonnss _c The literal character _c. _C A single (required) character. _P_s A single (usually optional) numeric parameter, composed of one of more digits. _P_m A multiple numeric parameter composed of any number of single numeric parameters, separated by ; character(s). _P_t A text parameter composed of printable characters. CC11 ((88--BBiitt)) CCoonnttrrooll CChhaarraacctteerrss The _x_t_e_r_m 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: ESC D Index (IND: 0x84) ESC E Next Line (NEL: 0x85) ESC H Tab Set (HTS: 0x88) ESC M Reverse Index (RI: 0x8d) ESC N Single Shift Select of G2 Character Set (SS2: 0x8e): affects next character only ESC O Single Shift Select of G3 Character Set (SS3: 0x8f): affects next character only ESC P Device Control String (DCS: 0x90) ESC V Start of Guarded Area (SPA: 0x96) ESC W End of Guarded Area (EPA: 0x97) ESC X Start of String (SOS: 0x98) ESC Z Return Terminal ID (DECID: 0x9a). Obsolete form of CSI c (DA). ESC [ Control Sequence Introducer (CSI: 0x9b) ESC \ String Terminator (ST: 0x9c) ESC ] Operating System Command (OSC: 0x9d) ESC ^ Privacy Message (PM: 0x9e) ESC _ Application Program Command (APC: 0x9f) These control characters are used in the vtXXX emulation. VVTT110000 MMooddee Most of these control sequences are standard VT102 control sequences, but there is support for later DEC VT terminals (i.e., VT220 and VT320), as well as ISO 6429 and _a_i_x_t_e_r_m color controls. VT102 features not sup­ ported are auto-repeat and blinking characters. There are additional control sequences to provide _x_t_e_r_m_-dependent functions, such as the scrollbar or window size. Where the function is specified by DEC or ISO 6429, the code assigned to it is given in parentheses. The escape codes to designate and invoke character sets are specified by ISO 2022; see that document for a discussion of character sets. BEL Bell (Ctrl-G) BS Backspace (Ctrl-H) CR Carriage Return (Ctrl-M) ENQ Return Terminal Status (Ctrl-E). Response is the termi­ nal name, e.g., "xterm". FF Form Feed or New Page (NP) (Ctrl-L) same as LF LF Line Feed or New Line (NL) (Ctrl-J) SO Shift Out (Ctrl-N) -> Switch to Alternate Character Set: invokes the G1 character set. SP Space. TAB Horizontal Tab (HT) (Ctrl-I) VT Vertical Tab (Ctrl-K) same as LF SI Shift In (Ctrl-O) -> Switch to Standard Character Set: invokes the G0 character set (the default). ESC SP F 7-bit controls (S7C1T). ESC SP G 8-bit controls (S8C1T). ESC SP L Set ANSI conformance level 1 (vt100, 7-bit controls). ESC SP M Set ANSI conformance level 2 (vt200). ESC SP N Set ANSI conformance level 3 (vt300). ESC # 3 DEC double-height line, top half (DECDHL) ESC # 4 DEC double-height line, bottom half (DECDHL) ESC # 5 DEC single-width line (DECSWL) ESC # 6 DEC double-width line (DECDWL) ESC # 8 DEC Screen Alignment Test (DECALN) ESC ( _C Designate G0 Character Set (ISO 2022) ESC ) _C Designate G1 Character Set (ISO 2022) ESC * _C Designate G2 Character Set (ISO 2022) ESC + _C Designate G3 Character Set (ISO 2022) Final character _C for designating character sets (0 , A and B apply to VT100 and up, the remainder to VT220 and up): _C = 0 -> DEC Special Character and Line Drawing Set _C = A -> United Kingdom (UK) _C = B -> United States (USASCII) _C = 4 -> Dutch _C = C or 5 -> Finnish _C = R -> French _C = Q -> French Canadian _C = K -> German _C = Y -> Italian _C = E or 6 -> Norwegian/Danish _C = Z -> Spanish _C = H or 7 -> Swedish _C = = -> Swiss ESC 7 Save Cursor (DECSC) ESC 8 Restore Cursor (DECRC) ESC = Application Keypad (DECPAM) ESC > Normal Keypad (DECPNM) ESC F Cursor to lower left corner of screen (if enabled by the hhppLLoowweerrlleeffttBBuuggCCoommppaatt resource). ESC c Full Reset (RIS) 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 (LS2) ESC o Invoke the G3 Character Set (LS3) ESC | Invoke the G3 Character Set as GR (LS3R). Has no visible effect in _x_t_e_r_m. ESC } Invoke the G2 Character Set as GR (LS2R). Has no visible effect in _x_t_e_r_m. ESC ~ Invoke the G1 Character Set as GR (LS1R). Has no visible effect in _x_t_e_r_m. APC _P_t ST _x_t_e_r_m implements no APC functions; _P_t is ignored. _P_t need not be printable characters. DCS _P_s; _P_s| _P_t ST User-Defined Keys (DECUDK). The first parameter: _P_s = 0 -> Clear all UDK definitions before starting (default) _P_s = 1 -> Erase Below (default) The second parameter: _P_s = 0 -> Lock the keys (default) _P_s = 1 -> Do not lock. The third parameter is a ';'-separated list of strings denoting the key-code separated by a '/' from the hex- encoded key value. The key codes correspond to the DEC function-key codes (e.g., F6=17). DCS $ q _P_t ST Request Status String (DECRQSS). The string following the "q" is one of the following: " q -> DECSCA " p -> DECSCL r -> DECSTBM m -> SGR _x_t_e_r_m responds with DCS 1 $ r _P_t ST for valid requests, replacing the _P_t with the corresponding CSI string, or DCS 0 $ r _P_t ST for invalid requests. CSI _P_s @ Insert _P_s (Blank) Character(s) (default = 1) (ICH) CSI _P_s A Cursor Up _P_s Times (default = 1) (CUU) CSI _P_s B Cursor Down _P_s Times (default = 1) (CUD) CSI _P_s C Cursor Forward _P_s Times (default = 1) (CUF) CSI _P_s D Cursor Backward _P_s Times (default = 1) (CUB) CSI _P_s E Cursor Next Line _P_s Times (default = 1) (CNL) CSI _P_s F Cursor Preceding Line _P_s Times (default = 1) (CPL) CSI _P_s G Cursor Character Absolute [column] (default = [row,1]) (CHA) CSI _P_s ; _P_s H Cursor Position [row;column] (default = [1,1]) (CUP) CSI _P_s I Cursor Forward Tabulation _P_s tab stops (default = 1) (CHT) CSI _P_s J Erase in Display (ED) _P_s = 0 -> Erase Below (default) _P_s = 1 -> Erase Above _P_s = 2 -> Erase All CSI ? _P_s J Erase in Display (DECSED) _P_s = 0 -> Selective Erase Below (default) _P_s = 1 -> Selective Erase Above _P_s = 2 -> Selective Erase All CSI _P_s K Erase in Line (EL) _P_s = 0 -> Erase to Right (default) _P_s = 1 -> Erase to Left _P_s = 2 -> Erase All CSI ? _P_s K Erase in Line (DECSEL) _P_s = 0 -> Selective Erase to Right (default) _P_s = 1 -> Selective Erase to Left _P_s = 2 -> Selective Erase All CSI _P_s L Insert _P_s Line(s) (default = 1) (IL) CSI _P_s M Delete _P_s Line(s) (default = 1) (DL) CSI _P_s P Delete _P_s Character(s) (default = 1) (DCH) CSI _P_s S Scroll up _P_s lines (default = 1) (SU) CSI _P_s T Scroll down _P_s lines (default = 1) (SD, according to DEC) CSI _P_s ; _P_s ; _P_s ; _P_s ; _P_s T Initiate hilite mouse tracking. Parameters are [func;startx;starty;firstrow;lastrow]. See the section MMoouussee TTrraacckkiinngg. CSI _P_s X Erase _P_s Character(s) (default = 1) (ECH) CSI _P_s Z Cursor Backward Tabulation _P_s tab stops (default = 1) (CBT) CSI _P_s ^ Scroll down _P_s lines (default = 1) (SD, according to ISO) CSI _P_m ` Character Position Absolute [column] (default = [row,1]) (HPA) CSI _P_s b Repeat the preceding graphic character _P_s times (REP) CSI _P_s c Send Device Attributes (DA) _P_s = 0 or omitted -> request attributes from terminal -> CSI ? 1 ; 2 c (``I am a VT100 with Advanced Video Option.'') CSI _P_m d Line Position Absolute [row] (default = [1,column]) (VPA) CSI _P_s ; _P_s f Horizontal and Vertical Position [row;column] (default = [1,1]) (HVP) CSI _P_s g Tab Clear (TBC) _P_s = 0 -> Clear Current Column (default) _P_s = 3 -> Clear All CSI _P_m h Set Mode (SM) _P_s = 2 -> Keyboard Action Mode (AM) _P_s = 4 -> Insert Mode (IRM) _P_s = 1 2 -> Send/receive (SRM) _P_s = 2 0 -> Automatic Newline (LNM) CSI _P_m i Media Copy (MC) _P_s = 0 -> Print screen (default) _P_s = 4 -> Turn off printer controller mode _P_s = 5 -> Turn on printer controller mode CSI ? _P_m i Media Copy (MC, DEC-specific) _P_s = 1 -> Print line containing cursor _P_s = 4 -> Turn off autoprint mode _P_s = 5 -> Turn on autoprint mode CSI _P_m l Reset Mode (RM) _P_s = 2 -> Keyboard Action Mode (AM) _P_s = 4 -> Replace Mode (IRM) _P_s = 1 2 -> Send/receive (SRM) _P_s = 2 0 -> Normal Linefeed (LNM) CSI _P_m m Character Attributes (SGR) _P_s = 0 -> Normal (default) _P_s = 1 -> Bold _P_s = 4 -> Underlined _P_s = 5 -> Blink (appears as Bold) _P_s = 7 -> Inverse _P_s = 8 -> Invisible (hidden) _P_s = 2 2 -> Normal (neither bold nor faint) _P_s = 2 4 -> Not underlined _P_s = 2 5 -> Steady (not blinking) _P_s = 2 7 -> Positive (not inverse) _P_s = 2 8 -> Visible (not hidden) _P_s = 3 0 -> Set foreground color to Black _P_s = 3 1 -> Set foreground color to Red _P_s = 3 2 -> Set foreground color to Green _P_s = 3 3 -> Set foreground color to Yellow _P_s = 3 4 -> Set foreground color to Blue _P_s = 3 5 -> Set foreground color to Magenta _P_s = 3 7 -> Set foreground color to Cyan _P_s = 3 7 -> Set foreground color to White _P_s = 3 9 -> Set foreground color to default (original) _P_s = 4 0 -> Set background color to Black _P_s = 4 1 -> Set background color to Red _P_s = 4 2 -> Set background color to Green _P_s = 4 3 -> Set background color to Yellow _P_s = 4 4 -> Set background color to Blue _P_s = 4 5 -> Set background color to Magenta _P_s = 4 6 -> Set background color to Cyan _P_s = 4 7 -> Set background color to White _P_s = 4 9 -> Set background color to default (origi­ nal). If 16-color support is compiled, the following apply. Assume that _x_t_e_r_m's resources are set so that the ISO color codes are the first 8 of a set of 16. Then the _a_i_x_t_e_r_m colors are the bright versions of the ISO colors: _P_s = 9 0 -> Set foreground color to Black _P_s = 9 1 -> Set foreground color to Red _P_s = 9 2 -> Set foreground color to Green _P_s = 9 3 -> Set foreground color to Yellow _P_s = 9 4 -> Set foreground color to Blue _P_s = 9 5 -> Set foreground color to Magenta _P_s = 9 7 -> Set foreground color to Cyan _P_s = 9 7 -> Set foreground color to White _P_s = 1 0 0 -> Set background color to Black _P_s = 1 0 1 -> Set background color to Red _P_s = 1 0 2 -> Set background color to Green _P_s = 1 0 3 -> Set background color to Yellow _P_s = 1 0 4 -> Set background color to Blue _P_s = 1 0 5 -> Set background color to Magenta _P_s = 1 0 6 -> Set background color to Cyan _P_s = 1 0 7 -> Set background color to White If _x_t_e_r_m is compiled with the 16-color support disabled, it supports the following, from _r_x_v_t: _P_s = 1 0 0 -> Set foreground and background color to default CSI _P_s n Device Status Report (DSR) _P_s = 5 -> Status Report CSI 0 n (``OK'') _P_s = 6 -> Report Cursor Position (CPR) [row;column] as CSI _r ; _c R CSI ? _P_s n Device Status Report (DSR, DEC-specific) _P_s = 6 -> Report Cursor Position (CPR) [row;column] as CSI ? _r ; _c R (assumes page is zero). _P_s = 1 5 -> Report Printer status as CSI ? 1 0 n (ready) or CSI ? 1 1 n (not ready) _P_s = 2 5 -> Report UDK status as CSI ? 2 0 n (unlocked) or CSI ? 2 1 n (locked) _P_s = 2 6 -> Report Keyboard status as CSI ? 2 7 ; 1 ; 0 ; 0 n (North American) CSI ! p Soft terminal reset (DECSTR) CSI _P_s ; _P_s " p Set conformance level (DECSCL) Valid values for the first parameter: _P_s = 6 1 -> VT100 _P_s = 6 2 -> VT200 _P_s = 6 3 -> VT300 Valid values for the second parame­ ter: _P_s = 0 -> 8-bit controls _P_s = 1 -> 7-bit controls (always set for VT100) _P_s = 2 -> 8-bit controls CSI _P_s " q Select character protection attribute (DECSCA). Valid values for the parameter: _P_s = 0 -> DECSED and DECSEL can erase (default) _P_s = 1 -> DECSED and DECSEL cannot erase _P_s = 2 -> DECSED and DECSEL can erase CSI _P_s ; _P_s r Set Scrolling Region [top;bottom] (default = full size of window) (DECSTBM) CSI _P_s ; _P_s ; _P_s t Window manipulation (from _d_t_t_e_r_m). Valid values for the first (and any additional parameters) are: _P_s = 1 -> Restore (de-iconify) window. _P_s = 2 -> Minimize (iconify) window. _P_s = 3 ; _x _; _y -> Move window to [x, y]. _P_s = 4 ; _h_e_i_g_h_t _; _w_i_d_t_h -> Resize the _x_t_e_r_m window to height and width in pixels. _P_s = 5 -> Raise the _x_t_e_r_m window to the front of the stacking order. _P_s = 6 -> Lower the _x_t_e_r_m window to the bottom of the stacking order. _P_s = 7 -> Refresh the _x_t_e_r_m window. _P_s = 8 ; _h_e_i_g_h_t _; _w_i_d_t_h -> Resize the text area to [height;width] in characters. _P_s = 1 1 -> Report _x_t_e_r_m window state. If the _x_t_e_r_m window is open (non-iconified), it returns CSI 1 t . If the _x_t_e_r_m window is iconified, it returns CSI 2 t . _P_s = 1 3 -> Report _x_t_e_r_m window position as CSI 3 ; _x; _yt _P_s = 1 4 -> Report _x_t_e_r_m window in pixels as CSI 4 ; _h_e_i_g_h_t ; _w_i_d_t_h t _P_s = 1 8 -> Report the size of the text area in char­ acters as CSI 8 ; _h_e_i_g_h_t ; _w_i_d_t_ht _P_s = 2 0 -> Report _x_t_e_r_m window's icon label as OSC L _l_a_b_e_l ST _P_s = 2 1 -> Report _x_t_e_r_m window's title as OSC l _t_i_t_l_e ST _P_s >= 2 4 -> Resize to _P_s lines (DECSLPP) CSI _P_s x Request Terminal Parameters (DECREQTPARM) CSI ? _P_m h DEC Private Mode Set (DECSET) _P_s = 1 -> Application Cursor Keys (DECCKM) _P_s = 2 -> Designate USASCII for character sets G0-G3 (DECANM), and set VT100 mode. _P_s = 3 -> 132 Column Mode (DECCOLM) _P_s = 4 -> Smooth (Slow) Scroll (DECSCLM) _P_s = 5 -> Reverse Video (DECSCNM) _P_s = 6 -> Origin Mode (DECOM) _P_s = 7 -> Wraparound Mode (DECAWM) _P_s = 8 -> Auto-repeat Keys (DECARM) _P_s = 9 -> Send Mouse X & Y on button press. See the section MMoouussee TTrraacckkiinngg. _P_s = 1 8 -> Print form feed (DECPFF) _P_s = 1 9 -> Set print extent to full screen (DECPEX) _P_s = 2 5 -> Show Cursor (DECTCEM) _P_s = 3 8 -> Enter Tektronix Mode (DECTEK) _P_s = 4 0 -> Allow 80 <--> 132 Mode _P_s = 4 1 -> _m_o_r_e(1) fix (see _c_u_r_s_e_s resource) _P_s = 4 2 -> Enable Nation Replacement Character sets (DECNRCM) _P_s = 4 4 -> Turn On Margin Bell _P_s = 4 5 -> Reverse-wraparound Mode _P_s = 4 6 -> Start Logging (normally disabled by a com­ pile-time option) _P_s = 4 7 -> Use Alternate Screen Buffer (unless dis­ abled by the ttiitteeIInnhhiibbiitt resource) _P_s = 6 7 -> Backarrow key (DECBKM) _P_s = 1 0 0 0 -> Send Mouse X & Y on button press and release. See the section MMoouussee TTrraacckkiinngg. _P_s = 1 0 0 1 -> Use Hilite Mouse Tracking. _P_s = 1 0 0 2 -> Use Cell Motion Mouse Tracking. _P_s = 1 0 0 3 -> Use All Motion Mouse Tracking. _P_s = 1 0 4 7 -> Use Alternate Screen Buffer (unless disabled by the ttiitteeIInnhhiibbiitt resource) _P_s = 1 0 4 8 -> Save cursor as in DECSC (unless dis­ abled by the ttiitteeIInnhhiibbiitt resource) CSI ? _P_m l DEC Private Mode Reset (DECRST) _P_s = 1 -> Normal Cursor Keys (DECCKM) _P_s = 2 -> Designate VT52 mode (DECANM). _P_s = 3 -> 80 Column Mode (DECCOLM) _P_s = 4 -> Jump (Fast) Scroll (DECSCLM) _P_s = 5 -> Normal Video (DECSCNM) _P_s = 6 -> Normal Cursor Mode (DECOM) _P_s = 7 -> No Wraparound Mode (DECAWM) _P_s = 8 -> No Auto-repeat Keys (DECARM) _P_s = 9 -> Don't Send Mouse X & Y on button press _P_s = 1 8 -> Don't print form feed (DECPFF) _P_s = 1 9 -> Limit print to scrolling region (DECPEX) _P_s = 2 5 -> Hide Cursor (DECTCEM) _P_s = 4 0 -> Disallow 80 <--> 132 Mode _P_s = 4 1 -> No _m_o_r_e(1) fix (see _c_u_r_s_e_s resource) _P_s = 4 2 -> Disable Nation Replacement Character sets (DECNRCM) _P_s = 4 4 -> Turn Off Margin Bell _P_s = 4 5 -> No Reverse-wraparound Mode _P_s = 4 6 -> Stop Logging (normally disabled by a com­ pile-time option) _P_s = 4 7 -> Use Normal Screen Buffer _P_s = 6 7 -> Backarrow key (DECBKM) _P_s = 1 0 0 0 -> Don't Send Mouse X & Y on button press and release. See the section MMoouussee TTrraacckkiinngg. _P_s = 1 0 0 1 -> Don't Use Hilite Mouse Tracking _P_s = 1 0 0 2 -> Don't Use Cell Motion Mouse Tracking _P_s = 1 0 0 3 -> Don't Use All Motion Mouse Tracking _P_s = 1 0 4 7 -> Use Normal Screen Buffer, clearing screen first if in the Alternate Screen (unless disabled by the ttiitteeIInnhhiibbiitt resource) _P_s = 1 0 4 8 -> Restore cursor as in DECRC (unless disabled by the ttiitteeIInnhhiibbiitt resource) CSI ? _P_m r Restore DEC Private Mode Values. The value of _P_s previ­ ously saved is restored. _P_s values are the same as for DECSET. CSI ? _P_m s Save DEC Private Mode Values. _P_s values are the same as for DECSET. OSC _P_s ; _P_t ST OSC _P_s ; _P_t BEL Set Text Parameters _P_s = 0 -> Change Icon Name and Window Title to _P_t _P_s = 1 -> Change Icon Name to _P_t _P_s = 2 -> Change Window Title to _P_t _P_s = 1 0 -> Change color names starting with text foreground to _P_t (a list of one or more color names, sep­ arated by semicolon, up to seven). _P_s = 1 1 -> Change colors starting with text back­ ground to _P_t _P_s = 1 2 -> Change colors starting with text cursor to _P_t _P_s = 1 3 -> Change colors starting with mouse fore­ ground to _P_t _P_s = 1 4 -> Change colors starting with mouse back­ ground to _P_t _P_s = 1 5 -> Change colors starting with Tek foreground to _P_t _P_s = 1 6 -> Change colors starting with Tek background to _P_t _P_s = 1 7 -> Change colors starting with highlight to _P_t _P_s = 4 6 -> Change Log File to _P_t (normally disabled by a compile-time option) _P_s = 5 0 -> Set Font to _P_t PM _P_t ST _x_t_e_r_m implements no PM functions; _P_t is ignored. _P_t need not be printable characters. MMoouussee TTrraacckkiinngg 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. There are five mutually exclusive modes, each enabled (or disabled) by a different parameter in the DECSET CSI ? _P_m h or DECRST CSI ? _P_m l con­ trol sequence. Manifest constants for the parameter values are defined in xxcchhaarrmmoouussee..hh as follows: #define SET_X10_MOUSE 9 #define SET_VT200_MOUSE 1000 #define SET_VT200_HIGHLIGHT_MOUSE 1001 #define SET_BTN_EVENT_MOUSE 1002 #define SET_ANY_EVENT_MOUSE 1003 The motion reporting modes are strictly _x_t_e_r_m extensions, and are not part of any standard, though they are analogous to the DEC VT200 DECELR locator reports. Parameters (such as pointer position and button number) for all mouse tracking escape sequences generated by _x_t_e_r_m encode numeric parameters in a single character as _v_a_l_u_e+32. For example, ! specifies the value 1. The upper left character position on the terminal is denoted as 1,1. X10 compatibility mode sends an escape sequence only on button press, encoding the location and the mouse button pressed. It is enabled by specifying parameter 9 to DECSET. On button press, _x_t_e_r_m sends CSI M _C_b_C_x_C_y (6 characters). _C_b is button-1. _C_x and _C_y are the x and y coor­ dinates of the mouse when the button was pressed. Normal tracking mode sends an escape sequence on both button press and release. Modifier key (shift, ctrl, meta) information is also sent. It is enabled by specifying parameter 1000 to DECSET. On button press or release, _x_t_e_r_m sends CSI M _C_b_C_x_C_y. The low two bits of _C_b encode button information: 0=MB1 pressed, 1=MB2 pressed, 2=MB3 pressed, 3=release. The upper bits encode the modifiers which were down when the button was pressed and are added together. 4=Shift, 8=Meta, 16=Control. _C_x and _C_y are the x and y coordinates of the mouse event. The upper left corner is (1,1). Mouse hilite 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. WWaarrnniinngg:: use of this mode requires a coop­ erating program or it will hang _x_t_e_r_m_. On button press, the same infor­ mation as for normal tracking is generated; _x_t_e_r_m then waits for the program to send mouse tracking information. _A_l_l _X _e_v_e_n_t_s _a_r_e _i_g_n_o_r_e_d _u_n_t_i_l _t_h_e _p_r_o_p_e_r _e_s_c_a_p_e _s_e_q_u_e_n_c_e _i_s _r_e_c_e_i_v_e_d _f_r_o_m _t_h_e _p_t_y_: CSI _P_s ; _P_s ; _P_s ; _P_s ; _P_s T . The parameters are _f_u_n_c_, _s_t_a_r_t_x_, _s_t_a_r_t_y_, _f_i_r_s_t_r_o_w_, and _l_a_s_t_r_o_w_. _f_u_n_c is non-zero to initiate hilite tracking and zero to abort. _s_t_a_r_t_x and _s_t_a_r_t_y give the starting x and y location for the highlighted region. The ending location tracks the mouse, but will never be above row _f_i_r_s_t_r_o_w and will always be above row _l_a_s_t_r_o_w_. (The top of the screen is row 1.) When the button is released, _x_t_e_r_m reports the ending position one of two ways: if the start and end coordinates are valid text locations: CSI t _C_x_C_y. If either coordinate is past the end of the line: CSI T _C_x_C_y_C_x_C_y_C_x_C_y. The parameters are _s_t_a_r_t_x_, _s_t_a_r_t_y_, _e_n_d_x_, _e_n_d_y_, _m_o_u_s_e_x_, and _m_o_u_s_e_y_. _s_t_a_r_t_x_, _s_t_a_r_t_y_, _e_n_d_x_, and _e_n_d_y give the starting and ending character positions of the region. _m_o_u_s_e_x and _m_o_u_s_e_y give the location of the mouse at button up, which may not be over a character. Button-event tracking is essentially the same as normal tracking, but _x_t_e_r_m also reports button-motion events. Motion events are reported only if the mouse pointer has moved to a different character cell. It is enabled by specifying parameter 1002 to DECSET. On button press or release, _x_t_e_r_m sends the same codes used by normal tracking mode. On button-motion events, _x_t_e_r_m adds 4 to the event code (the third charac­ ter, _C_b). The low two bits of the event code encode the button informa­ tion. The third bit is set to indicate motion. Additional bits specify modifier keys as in normal mode. For example, motion into cell x,y with button 1 down is reported as CSI M @ _C_x_C_y. ( @ = 32 + 0 (button 1) + 32 (motion indicator) ). Similarly, motion with button 3 down is reported as CSI M B _C_x_C_y. ( B = 32 + 2 (button 3) + 32 (motion indica­ tor) ). Any-event mode is the same as button-event mode, except that all motion events are reported instead of just those that enter a new character cell. It is enabled by specifying 1003 to DECSET. TTeekkttrroonniixx 44001144 MMooddee Most of these sequences are standard Tektronix 4014 control sequences. Graph mode supports the 12-bit addressing of the Tektronix 4014. The major features missing are the write-through and defocused modes. This document does not describe the commands used in the various Tektronix plotting modes but does describe the commands to switch modes. BEL Bell (Ctrl-G) BS Backspace (Ctrl-H) TAB Horizontal Tab (Ctrl-I) LF Line Feed or New Line (Ctrl-J) VT Cursor up (Ctrl-K) FF Form Feed or New Page (Ctrl-L) CR Carriage Return (Ctrl-M) ESC ETX Switch to VT100 Mode (ESC Ctrl-C) ESC ENQ Return Terminal Status (ESC Ctrl-E) ESC FF PAGE (Clear Screen) (ESC Ctrl-L) ESC SO Begin 4015 APL mode (ignored by _x_t_e_r_m) (ESC Ctrl-N) ESC SI End 4015 APL mode (ignored by _x_t_e_r_m) (ESC Ctrl-O) ESC ETB COPY (Save Tektronix Codes to file COPYyyyy-mm- dd.hh:mm:ss) (ESC Ctrl-W) ESC CAN Bypass Condition (ESC Ctrl-X) ESC SUB GIN mode (ESC Ctrl-Z) ESC FS Special Point Plot Mode (ESC Ctrl-\) ESC 8 Select Large Character Set ESC 9 Select #2 Character Set ESC : Select #3 Character Set ESC ; Select Small Character Set OSC _P_s ; _P_t BEL Set Text Parameters of VT window _P_s = 0 -> Change Icon Name and Window Title to _P_t _P_s = 1 -> Change Icon Name to _P_t _P_s = 2 -> Change Window Title to _P_t _P_s = 4 6 -> Change Log File to _P_t (normally disabled by a compile-time option) ESC ` Normal Z Axis and Normal (solid) Vectors ESC a Normal Z Axis and Dotted Line Vectors ESC b Normal Z Axis and Dot-Dashed Vectors ESC c Normal Z Axis and Short-Dashed Vectors ESC d Normal Z Axis and Long-Dashed Vectors ESC h Defocused Z Axis and Normal (solid) Vectors ESC i Defocused Z Axis and Dotted Line Vectors ESC j Defocused Z Axis and Dot-Dashed Vectors ESC k Defocused Z Axis and Short-Dashed Vectors ESC l Defocused Z Axis and Long-Dashed Vectors ESC p Write-Thru Mode and Normal (solid) Vectors ESC q Write-Thru Mode and Dotted Line Vectors ESC r Write-Thru Mode and Dot-Dashed Vectors ESC s Write-Thru Mode and Short-Dashed Vectors ESC t Write-Thru Mode and Long-Dashed Vectors FS Point Plot Mode (Ctrl-\) GS Graph Mode (Ctrl-]) RS Incremental Plot Mode (Ctrl-^) US Alpha Mode (Ctrl-_) VVTT5522 MMooddee Parameters for cursor movement are at the end of the ESC Y escape sequence. Each ordinate is encoded in a single character as _v_a_l_u_e+32. For example, ! is 1. The screen coodinate system is 0-based. ESC A Cursor up. ESC B Cursor down. ESC C Cursor right. ESC D Cursor left. ESC F Enter graphics mode. ESC G Exit graphics mode. ESC H Move the cursor to the home position. ESC I Reverse line feed. ESC J Erase from the cursor to the end of the screen. ESC K Erase from the cursor to the end of the line. ESC Y _P_s _P_s Move the cursor to given row and column. ESC Z Identify -> ESC / Z (``I am a VT52.'') ESC = Enter alternate keypad mode. ESC > Exit alternate keypad mode. ESC < Exit VT52 mode (Enter VT100 mode).