dtterm(5)

NAME
dtterm - escape sequences recognized by dtterm

DESCRIPTION

  Received Escape Sequences
The dtterm(1) client supports the following list of received escape sequences. Spaces have been added for readability and are not part of the escape sequence. The following indicate parameters: pi, p1, and keyword. Space indicates a required space, ASCII code 0x20. A control-G indicates a control code (in this case ASCII code 0x07). Esc indicates ASCII code 0x1b. BackSlash indicates ASCII code 0x5c. Literals are indicated as literal and must be included exactly as specified.

    (BEL) Bell. The terminal either issues an audible bell, or flashes the text window depending on the state of the visual bell flag. (BS) Backspace. The cursor moves one cursor position to the left. If reverse-wrap mode is disabled and the cursor is at the left-most column of the line when a backspace character is received, the cursor remains at its current position. If reverse-wrap mode is enabled and the cursor is at the left-most column of the line when a backspace character is received, the cursor moves to the right-most column of the previous line. If the cursor is also in the top-most row, the cursor moves to the right-most column of the bottom-most row. (HT) Horizontal Tab. The cursor moves right to the next tab stop. If there are no further tab stops set to the right of the cursor, the cursor moves to the right-most column of the current line. (LF) Line Feed or New Line. The cursor moves to the same column of the next line. If the cursor is in the bottom-most line of the scrolling region, the scrolling region scrolls up one line. Lines scrolled off the top of the scrolling region are lost. Blank lines with no visible character attributes are added at the bottom of the scrolling region. (VT) Vertical Tab. Same as Line Feed. (FF) Form Feed or New Page. Same as Line Feed. (CR) Carriage Return. The cursor moves to the left-most column of the current line. (SCS) Designate ASCII (base font) as G0. (SCS) Designate DEC Special Graphic (line draw) as G0. (SCS) Designate ASCII (base font) as G1. (SCS) Designate DEC Special Graphic (line draw) as G1. (SCS) Designate ASCII (base font) as G2. (SCS) Designate DEC Special Graphic (line draw) as G2. (SCS) Designate ASCII (base font) as G3. (SCS) Designate DEC Special Graphic (line draw) as G3. (LS1) Map G1 into GL. (LS0) Map G0 into GL. (LS2) Map G2 into GL. (LS3) Map G3 into GL. (SS2) Map G2 into GL for the next character. (SS3) Map G3 into GL for the next character. (S7C1T) Select 7-Bit C1 Control Characters. In this mode, the dtterm utility sends all C1 Control Characters to the host as 7-Bit escape sequences. That is, CSI is sent to the host as ``Esc [''. (C8C1T) Select 8-Bit C1 Control Characters. In this mode, the dtterm utility sends all C1 Control Characters to the host as 8-Bit control codes. That is, CSI is sent back as the hex value 0x9B. (DECALN) DEC Screen Align Test. The screen is filled with the character ``E''. (DECSC) Save cursor. The following is saved:

    (DECRC) Restore cursor. The terminal emulator is restored to the state saved by the save cursor (DECSC) function. If nothing was saved by DECSC, then the following actions are performed:

    (DECPAM) Application keypad. In this mode, the numeric keypad sends application sequences. (See the ``Transmitted Escape Sequences'' section later in this document for additional information.) (DECPNM) Normal keypad. In this mode, the numeric keypad sends the characters shown on the keypad. Keys PF1 through PF4 send application sequences. (See the ``Transmitted Escape Sequences'' section later in this document for additional information.) (IND) Index. The cursor moves down to the same column of the next line. If the cursor is in the bottom-most line of the scrolling region, the scrolling region is scrolled up one line. The line scrolled off the top of the scrolling region is lost. A blank line with no visible character attributes is added at the bottom of the scrolling region. (NEL) Next line. The cursor moves down to the first column of the next line. If the cursor is in the bottom-most line of the scrolling region, the scrolling region is scrolled up one line. The line scrolled off the top of the scrolling region is lost. A blank line with no visible character attributes is added at the bottom of the scrolling region. (HTS) Tab set. This function sets a horizontal tab stop at the column where the cursor is located. (RI) Reverse index. The cursor moves up to the same column of the previous line. If the cursor is in the top-most line of the scrolling region, the scrolling region is scrolled down one line. The line scrolled off the bottom of the scrolling region is lost. A blank line with no visible character attributes is added at the top of the scrolling region. (DECUDK) User defined keys (DECID) Return terminal ID. This function is similar to a primary device attributes (DA) request. (See ``Esc [ c '' (DA) described later in this document.) (RIS) Full reset. This function performs a full (hard) reset. (For additional information, see the ``Reset'' section later in this document.) (DECSCA) Select character protection attribute. The default value is zero. This escape sequence defines the characters that come after it as erasable or not erasable from the screen. The selective erase escape sequences, (DECSED and DECSEL), can only erase characters defined as erasable. Valid supported values of pi are:

        DECSED and DECSEL can erase characters. DECSED and DECSEL cannot erase characters. Same as 0.

    (ICH) Insert pi blank characters. The default value is one. A parameter value of zero or one inserts a single blank character. A parameter value of N inserts N blank characters. Blank characters with normal character attributes are inserted at the cursor position. Characters to the right of the cursor move to the right. Characters scrolled past the end of the line are lost. (CUU) Cursor up pi lines. The default value is one. A parameter value of zero or one moves the cursor up one line. A parameter value of N moves the cursor up N lines. The cursor stops at the top margin. If the cursor is already above the top margin, the cursor stops at the top line. (CUD) Cursor down pi lines. The default value is one. A parameter value of zero or one moves the cursor down one line. A parameter value of N moves the cursor down N lines. The cursor stops at the bottom margin. If the cursor is already below the bottom margin, the cursor stops at the bottom line. (CUF) Cursor forward pi characters. The default value is one. A parameter value of zero or one moves the cursor forward one character. A parameter value of N moves the cursor forward N characters. The cursor stops at the right-most column of the line. (CUB) Cursor backward pi characters. The default value is one. A parameter value of zero or one moves the cursor backward one character. A parameter value of N moves the cursor backward N characters. The cursor stops at the left-most column of the line. (CPL) Cursor to the first column of the pith preceding line. The default value is one. A parameter value of zero or one moves the cursor to the preceding line. A parameter value of N moves the cursor to the Nth preceding line. If the cursor is below the top margin, the cursor stops at the top margin. If the cursor is already above the top margin, the cursor stops at the top line. (CHA) Cursor to column pi. The default value is one. A parameter value of zero or one moves the cursor to the first column of the current line. A parameter value of N moves the cursor to the Nth column of the current line. (CUP) Cursor position. The default value is one. A p1 value of zero or one moves the cursor to row one. A p1 value of N moves the cursor to row N. A p2 value of zero or one moves the cursor to column one. A p2 value of N moves the cursor to column N. The starting point for lines and columns depends on the setting of the origin mode (DECOM). (ED) Erase in display. The default value is zero. A parameter value of zero erases from the cursor through the end of the display. A parameter value of one erases from the beginning of the display through the cursor position. A parameter value of two erases the complete display. (EL) Erase in line. The default value is zero. A parameter value of zero erases from the cursor through the end of the line. A parameter value of one erases from the beginning of the line through the cursor. A parameter value of two erases the complete line. (IL) Insert lines. The default value is one. A parameter value of zero or one inserts one line at the cursor. A parameter value of N inserts N lines at the cursor. As lines are inserted, lines below the cursor and in the scrolling region move down. Lines scrolled off the page are lost. There is no effect outside the scrolling region. (DL) Delete lines. The default value is one. A parameter value of zero or one deletes one line at the cursor. A parameter value of N deletes N lines at the cursor. As lines are deleted, lines below the cursor and in the scrolling region move up. Blank lines with no visible character attributes are added at the bottom of the scrolling region. There is no effect outside the scrolling region. (DCH) Delete characters. The default value is one. A parameter value of zero or one deletes one character at the cursor position. A parameter value of N deletes N characters at the cursor position. An parameter greater than the number of characters between the cursor and the right margin only deletes the remaining characters on the line. As characters are deleted, the remaining characters move left and are replaced by blank spaces with no visual character attributes. (SU) Scroll up pi lines. The default value is one. A parameter value of zero or one scrolls the display up one line. A parameter value of N scrolls the display up N lines. The scrolling region scrolls up. Lines scrolled off the top of the scrolling region are lost. Blank lines with no visible character attributes are added at the bottom of the scrolling region. (SD) Scroll down pi lines. The default value is one. A parameter value of zero or one scrolls the display down one line. A parameter value of N scrolls the display down N lines. The scrolling region scrolls down. Lines scrolled off the bottom of the scrolling region are lost. Blank lines with no visible character attributes are added at the top of the scrolling region. (ECH) Erase pi characters. The default value is one. A parameter value of zero or one erases a single character. A parameter value of N erases N characters. The character attributes of erased characters are cleared. This escape sequences works inside or outside the scrolling margins. (DA) Send device attributes. The default is zero. A parameter value of zero or one elicits a ``Esc [ ? 1 ; 2 c'' response from the terminal emulator. This is the standard response for the DEC VT100 Terminal and xterm(1X). (HVP) Horizontal and vertical position. This escape sequence has been replaced by CUP and offers identical functionality. It is provided to maintain backward compatibility. (TBC) Tab clear. The default is zero. A parameter value of zero clears the tab stop at the current cursor column. A parameter value of 3 clears all tab stops. (SM) Set mode. This escape sequence sets ANSI modes. Valid supported values of pi are:

        (KAM) Keyboard lock. In this mode, dtterm(1) ignores all keystrokes from the keyboard. (IRM) Insert mode. In this mode, new characters move characters in display memory to the right. Characters moved past the end of the line are lost. (SRM) Local echo off. In this mode, dtterm(1) sends keyboard characters to the host only. The host must echo back characters for them to be displayed. (LNM) New line. In this mode, the cursor moves to the first column on the next line when dtterm(1) receives an LF, FF, or VT character. When the Return key is pressed, dtterm(1) sends a carriage-return (CR) followed by a new line (NL).

    (RM) Reset mode. This escape sequences resets ANSI modes. Valid supported values of pi are:

        (KAM) Keyboard unlock. In this mode, dtterm(1) processes all keystrokes from the keyboard. (IRM) Replace mode. In this mode, new characters replace the character at the cursor position. (SRM) Local echo on. In this mode, dtterm(1) sends keyboard characters to both the host and the display. The host does not have to echo back characters for them to be displayed. (LNM) New line. In this mode, the cursor moves to the same column on the next line when dtterm(1) receives an LF, FF, or VT character. When the Return key is pressed, dtterm(1) sends a carriage-return (CR).

    (SG) Graphics rendition. The default value is zero. This escape sequence selects one or more character attributes. Valid supported values for pi are:

        Faint All attributes off Bold Faint Underline Blinking. This attribute appears as bold text Negative image Invisible image Bold and Faint off Underline off Blinking off Negative image off Invisible image off Black display (text) Red display (text) Green display (text) Yellow display (text) Blue display (text) Magenta display (text) Cyan display (text) White display (text) Default display (text) Black background Red background Green background Yellow background Blue background Magenta background Cyan background White background Default background

    (DSR) Device status report. Valid supported values for pi are:

        Operating status. The dtterm(1) utility responds with an OK message of ``Esc [ 0 n''. (CPR) Cursor position report. The dtterm(1) utility responds with the current cursor position in the form ``Esc [ p1 ; p2 R'' where p1 is the current cursor line and p2 is the current cursor row.

    (DSR) DEC private device status report. Valid supported values for pi are:

        Printer port status. The dtterm(1) utility responds with ``no printer available'' message of ``Esc [ ? 13 n''. User-defined key status. The dtterm(1) utility responds with either a message of ``Esc [ ? 20 n'' if UDKs are unlocked, or ``Esc [ ? 21 n'' if UDKs are locked. Keyboard status. The dtterm(1) utility responds with a message of ``Esc [ ? 27 ; 1 n'', which indicates a North American keyboard.

    (DECSTBM) Set top and bottom margins. The default value for p1 is one. The default value for p2 is the current number of lines in the terminal window. The top and bottom margins are set to p1 and p2 respectively. Scrolling is not performed outside the margins. Window manipulation. Valid values for p1 (and any additional parameters) are:

        Restore (de-iconify) window. Minimize (iconify) window. Move window to [x, y]. Resize the dtterm(1) window to height and width in pixels. Raise the dtterm(1) window to the front of the stacking order. Lower the dtterm(1) window to the bottom of the stacking order. Refresh the dtterm(1) window. Resize the text area to height and width in characters. Report dtterm(1) window state. If the dtterm(1) window is open (non-iconified), it returns ``Esc [ 1 t''. If the dtterm(1) window is iconified, it returns ``Esc [ 2 t''. Report the dtterm(1) window position. Returns ``Esc [ 3 ; x ; y t''. Report the dtterm(1) window in pixels. Returns ``Esc [ 4 ; height ; width t''. Report the size of the area in characters. Returns ``Esc [ 8 ; height ; width t''. Report the dtterm(1) window's icon label. Returns ``Esc ] L label Esc BackSlash''. Report the dtterm(1) window's title. Returns ``Esc ] l title Esc BackSlash''.

    Request terminal modes. The default value is zero. Valid values are zero or one. If pi is zero, dtterm(1) responds with the message of ``Esc [ 2 ; 1 ; 1 ; 112 ; 112 ; 1 ; 0 x''. If pi is 1, dtterm(1) responds with the message of ``Esc [ 3 ; 1 ; 1 ; 112 ; 112 ; 1 ; 0x''. This escape sequence is supported for backward compatibility for xterm(1X) only. (SM) DEC private set mode. This escape sequences sets DEC private modes. Valid supported values of pi are:

        (DECCKM) Enable cursor keys mode. When cursor keys mode is enabled, the arrow keys send application sequences to the host. (DECCOLM) Enable 132-column mode. When 132-column mode is enabled, the number of columns is the terminal window changed to 132. When entering into 132-column mode, the left, right, top, and bottom margins are reset to their default positions and the display is cleared. (DECSCLM) Enable smooth scrolling. When smooth scrolling is enabled, lines are added and the screen is scrolled a single line at a time. (DECSCNM) Enable reverse video. When reverse video mode is enabled, the foreground and background colors of the terminal window are reversed. (DECOM) Enable origin mode. When origin mode is enabled, the home cursor position is the upper-left corner of the screen, within the margins. The starting point for line numbers depends on the current top margin. The cursor cannot be moved outside the top and bottom margins. (DECAWM) Enable autowrap. When autowrap mode is enabled, characters received when the cursor is at the right-most column of the page are inserted at the beginning of the next line. If the cursor is at the bottom line of the scrolling region, the page is scrolled up 1 line. (DECARM) Enable auto-repeat keys. This option is ignored. (DECTCEM) Enable cursor visible. In this mode, the text cursor is visible. Enable DECCOLM escape sequence. When the DECCOLM escape sequence is enabled, the terminal emulator switches into either an 80- or 132-column window when it receives a DECCOLM escape sequence. Enable margin bell. When the margin bell is enabled, the dtterm utility's bell (either audible or visible) is invoked when the cursor is a predefined distance from the right margin and a key is pressed. Enable reverse-autowrap mode. When reverse-autowrap mode is enabled, and a backspace is received when the cursor is at the left-most column of the page, the cursor is wrapped to the right-most column of the previous line. If the cursor is at the top line of the scrolling region, the cursor is wrapped to the right-most column of the bottom line of the scrolling region. If the cursor is at the top line of terminal window, the cursor is wrapped to the right-most column of the bottom line of the terminal window. Enable logging. When logging is enabled, all text received from the child process is logged to a file.

    (RM) DEC private mode reset. This escape sequence sets DEC private modes. Valid supported values of pi are:

        (DECCKM) Disable cursor keys mode. When cursor keys mode is disabled, the arrow keys send ANSI cursor sequences to the host. (DECCOLM) Disable 132-column mode. When 132-column mode is disabled, the number of columns is the terminal window changed to 80. When entering into 80-column mode, the left, right, top, and bottom margins are reset to their default positions and the display is cleared. (DECSCLM) Disable smooth scrolling. When smooth scrolling is disabled, lines are added and the screen is scrolled up to a full screen at a time depending on how fast text is received from the child process. (DECSCNM) Disable reverse video. When reverse video mode is disabled, the foreground and background colors of the terminal window are not reversed. (DECOM) Disable origin mode. When origin mode is disabled, the home cursor position is the upper-left corner of the screen. The starting point for line numbers is independent of the current top margin. The cursor can be moved outside the top and bottom margins. (DECAWM) Disable autowrap. When autowrap mode is enabled, characters received when the cursor is at the right-most column of the page, replace the character already on the line. (DECARM) Disable auto-repeat keys. This option is ignored. (DECTCEM) Disable cursor visible. In this mode, the text cursor is invisible. Disable DECCOLM escape sequence. When the DECCOLM escape sequence is disabled, the terminal emulator ignores the DECCOLM escape sequence and does not switch into either an 80- or 132-column window when it is received. Disable margin bell. When the margin bell is disabled, the dtterm utility's bell is not invoked when the cursor is a pre-defined distance from the right margin and a key is pressed. Disable reverse-autowrap mode. When reverse-autowrap mode is disabled, and a backspace is received when the cursor is at the left-most column of the page, the cursor remains at that position. Disable logging. When logging is disabled, text received from the child process is not logged to a file.

    Restore DEC private mode values. The value corresponding to mode pi previously saved is restored. Valid values for pi are the same as the DEC private modes supported by SM. It is provided to maintain backward compatibility with xterm(1X). Using this escape sequence is discouraged. Save DEC private mode values. The value corresponding to mode pi is saved. Valid values for pi are the same as the DEC private modes supported by SM. This escape sequence is provided to maintain backward compatibility with xterm(1X). Using this escape sequence is discouraged. Set text parameters. This escape sequence allows various terminal emulator text values to be set. Valid supported values of p1 are:

        Change the icon name and window title to p2. Change the icon name to p2. Change the window title to p2. Set the current working directory to p2. The terminal emulator tries to restart in this directory when it is restarted in a new session.

    (PM) Privacy message. The data received in a privacy message is ignored and is not displayed. (APC) Application program command. The terminal emulator implements no APC functions. The data is ignored and is not displayed. (DECSEL) Selective erase in line. The default value is zero. This escape sequence only erases erasable characters in a single line of text. Only those characters defined as erasable by the DECSCA escape sequence are erased. A parameter value of zero erases from the cursor through the end of the line. A parameter value of one erases from the beginning of the line through the cursor. A parameter value of two erases the complete line. (DECSED) Selective erase in display. The default value is zero. This escape sequence only erases erasable characters in the display. Only those characters defined as erasable by the DECSCA escape sequence are erased. A parameter value of zero erases from the cursor through the end of the display. A parameter value of one erases from the beginning of the display through cursor position. A parameter value of two erases the complete display. Set window title to text. Set icon to icon found in file. Set icon name to label. (DECSTR) Soft terminal reset. This function performs a soft reset. For additional information, see the ``Reset'' section in this document.

  Reset
The dtterm(1) utility supports two levels of reset: full reset and soft reset. Reset can be invoked by menu buttons, the keyboard or by escape sequences. Soft reset performs the following actions:

Full reset performs the same functions as soft reset along with the following actions:

  Transmitted Escape Sequences

  Cursor Key Mode
The cursor keys transmit the following escape sequences depending on the setting of the mode specified, either via the appCursorDefault resource, or the mode specified via the DECCKM escape sequence.
Key | Normal | Application
Cursor Up | Esc [ A | Esc O A
Cursor Down | Esc [ B | Esc O B
Cursor Right | Esc [ C | Esc O C
Cursor Left | Esc [ D | Esc O D

  Application Keypad Mode
The application keypad transmits the following escape sequences depending on the setting of the mode specified, either via the appKeypadDefault resource, or the mode specified via the DECPNM escape sequence.
Key | Numeric | Application
Space | Space | Esc O A
Tab | Tab | Esc O I
Enter | CR | Esc O M
PF1 | Esc O P | Esc O P
PF2 | Esc O Q | Esc O Q
PF3 | Esc O R | Esc O R
PF4 | Esc O S | Esc O S
* (multiply) | * | Esc O j
+ (add) | + | Esc O k
, (comma) | , | Esc O l
- (minus) | - | Esc O m
/ (divide) | / | Esc O o
0 | 0 | Esc O p
1 | 1 | Esc O q
2 | 2 | Esc O r
3 | 3 | Esc O s
4 | 4 | Esc O t
5 | 5 | Esc O u
6 | 6 | Esc O v
7 | 7 | Esc O w
8 | 8 | Esc O x
9 | 9 | Esc O y
= (equal) |  | Esc O X

  ANSI Function Keys
The function keys transmit the following escape sequences unless Sun function keys mode has been selected, either via the dtterm -sk option, or the sunFunctionKeys dtterm(1) resource.
Key | Escape Sequence
F1 | Esc [ 1 1 ~
F2 | Esc [ 1 2 ~
F3 | Esc [ 1 3 ~
F4 | Esc [ 1 4 ~
F5 | Esc [ 1 5 ~
F6 | Esc [ 1 7 ~
F7 | Esc [ 1 8 ~
F8 | Esc [ 1 9 ~
F9 | Esc [ 2 0 ~
F10 | Esc [ 2 1 ~
F11 | Esc [ 2 3 ~
F12 | Esc [ 2 4 ~
F13 | Esc [ 2 5 ~
F14 | Esc [ 2 6 ~
F15 | Esc [ 2 8 ~
F16 | Esc [ 2 9 ~
F17 | Esc [ 3 1 ~
F18 | Esc [ 3 2 ~
F19 | Esc [ 3 3 ~
F20 | Esc [ 3 4 ~
Help | Esc [ 2 8 ~
Menu | Esc [ 2 9 ~
Find | Esc [ 1 ~
Insert | Esc [ 2 ~
Delete | Esc [ 3 ~
Remove | Esc [ 3 ~
Select | Esc [ 4 ~
Prior | Esc [ 5 ~
Next | Esc [ 6 ~

  Sun Function Keys
Key | Escape Sequence
F1 | Esc [ 2 2 4 z
F2 | Esc [ 2 2 5 z
F3 | Esc [ 2 2 6 z
F4 | Esc [ 2 2 7 z
F5 | Esc [ 2 2 8 z
F6 | Esc [ 2 2 9 z
F7 | Esc [ 2 3 0 z
F8 | Esc [ 2 3 1 z
F9 | Esc [ 2 3 2 z
F10 | Esc [ 2 3 3 z
F11 | Esc [ 1 9 2 z
F12 | Esc [ 1 9 3 z
F13 | Esc [ 1 9 4 z
F14 | Esc [ 1 9 5 z
F15 | Esc [ 1 9 6 z
F16 | Esc [ 1 9 7 z
F17 | Esc [ 1 9 8 z
F18 | Esc [ 1 9 9 z
F19 | Esc [ 2 0 0 z
F20 | Esc [ 2 0 1 z
F21 (R1) | Esc [ 2 0 8 z
F22 (R2) | Esc [ 2 0 9 z
F23 (R3) | Esc [ 2 1 0 z
F24 (R4) | Esc [ 2 1 1 z
F25 (R5) | Esc [ 2 1 2 z
F26 (R6) | Esc [ 2 1 3 z
F27 (R7) | Esc [ 2 1 4 z
F28 (R8) | Esc [ 2 1 5 z
F29 (R9) | Esc [ 2 1 6 z
F30 (R10) | Esc [ 2 1 7 z
F31 (R11) | Esc [ 2 1 8 z
F32 (R12) | Esc [ 2 1 9 z
F33 (R13) | Esc [ 2 2 0 z
F34 (R14) | Esc [ 1 2 1 z
F35 (R15) | Esc [ 1 2 2 z
Help | Esc [ 1 9 6 z
Menu | Esc [ 1 9 7 z
Find | Esc [ 1 z
Insert | Esc [ 2 z
Delete | Esc [ 3 z
Remove | Esc [ 3 z
Select | Esc [ 4 z
Prior | Esc [ 5 z
Next | Esc [ 6 z

SEE ALSO
dtterm(1), xterm(1X).