dtterm(5)
NAME
dtTerm − escape sequences recognized by dtterm and the DtTerm widget
DESCRIPTION
The workspace manager Cde workspace manager, and the DtTerm widget support the following list of received escape sequences. Spaces have been added for readability and are not part of the escape sequence. The following indicate arguments: “pi”, “p1”, and “keyword”. “Space” indicates a required space, ASCII code 0x20 “Ctrl-G” indicates a control code (in this case ASCII 0x07). “Esc” indicates ASCII code 0x1b. “BackSlash” indicates ASCII code 0x5c. Literals are indicated as “literal” and must be included exactly as specified. (Ctrl-G) Bell. The terminal either issues an audible bell, or flashes the text window depending on the state of the visual bell flag. (Ctrl-H) 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) ( Ctrl-I) 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. (NL) ( Ctrl-J) 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. (Ctrl-M) Carriage Return. The cursor moves to the left-most column of the current line. (DECALN) DEC Screen Align Test. The screen is filled with the character ‘E’. (DECSC) Save cursor (DECRC) Restore cursor (DECPAM) Application keypad (DECPNM) Normal keypad (IND) Index (NEL) Next line (HTS) Tab set (RI) Reverse index (DECUDK) User defined keys (DECID) Return terminal ID (RIS) Full reset (DECSCA) Select character protection attribute. The default value is 0. 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:
0DECSED and DECSEL can erase characters. 1DECSED and DECSEL cannot erase characters. 2 Same as 0. (ICH) Insert pi blank characters. The default value is 1. A 0 or 1 argument value inserts a single blank character. An N argument value 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 1. A 0 or 1 argument value moves the cursor up 1 line. An N argument value 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 1. A 0 or 1 argument value moves the cursor down 1 line. An N argument value 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 1. A 0 or 1 argument value moves the cursor forward 1 character. An N argument value 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 1. A 0 or 1 argument value1 moves the cursor forward 1 character. An N argument value moves the cursor forward 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 1. A 0 or 1 argument value moves the cursor to the preceding line. An N argument value moves the cursor forward 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 1. A argument value of 0 or 1 moves the cursor to the first column of the current line. A argument value of N moves the cursor to the Nth column of the current line. (CUP) Cursor position. The default values are 1. A p1 value of 0 or 1 moves the cursor to row 1. A p1 value of N moves the cursor to row N. A p2 value of 0 or 1 moves the cursor to column 1. 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 0. A 0 argument value erases from the cursor through the end of the display. A 1 argument value erases from the beginning of the display through the cursor position. A 2 argument value erases the complete display. (EL) Erase in line. The default value is 0. A 0 argument value erases from the cursor through the end of the line. A 1 argument value erases from the beginning of the line through the cursor. A 2 argument value erases the complete line. (IL) Insert lines. The default value is 1. A 0 or 1 argument value inserts one line at the cursor. An N argument value 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 1. A 0 or 1 argument value deletes one line at the cursor. An N argument value 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 1. A 0 or 1 argument value deletes one character at the cursor position. An N argument value deletes N characters at the cursor position. An argument 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 is 1. A 0 or 1 argument value scrolls the display up 1 line. An N argument value 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 is 1. A 0 or 1 argument value scrolls the display down 1 line. An N argumentvalue 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 1. A 0 or 1 argument value erases a single character. An N argument value erases N characters. The character attributes from erased characters are cleared. This escape sequences works inside or outside the scrolling margins. (DA) Send device attributes. The default is 0. A 0 or 1 argument value elicits a “Esc [ ? 1 ; 2 c” response from the terminal emulato. This is the standard response for the DEC VT100 Terminal and xterm. (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 0. A 0 argument value clears the tab stop at the current cursor column. A 3 argument value clears all tab stops. (SM) Set mode. This escape sequences sets ANSI modes. Valid supported values of pi are:
2(KAM) Keyboard lock. DKS: we need text here.???????????? 4(IRM) Insert mode. In this mode, new characters move characters in display memory to the right. Characters moved past the endof the line are lost.
12(SRM) Send/receive mode. DKS: we need text here.?????????????
20(LNM) New line. In this mode, the cursor moves to the first column on the next line when dtterm receives an LF, FF, or VT character. When the Return key is pressed, the emulator 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:
4(IRM) Replace mode. In this mode, new characters replace the character at the cursor position.
20(LNM) New line. In this mode, the cursor moves to the same column on the next line when the emulator receives an LF, FF, or VT character. When the Return key is pressed, dtterm sends a carriage-return (CR). (SGR) Character attributes. The default is 0. This escape sequence selects one or more character attributes. Valid supported values for pi are:
0All attributes off
1Bold
4Underline
5Blinking. This attribute appears as bold text
7Negative image
8Invisible image
22Bold off
24Underline off
25Blinking off
27Negative image off
28Invisible image off
30Black display (text)
31Red display (text)
32Green display (text)
33Yellow display (text)
34Blue display (text)
35Magenta display (text)
36Cyan display (text)
37White display (text)
39Default display (text) color
40Black background
41Red background
42Green background
43Yellow background
44Blue background
45Magenta background
46Cyan background
47White background
49Default background color (DSR) Device status report. Valid supported values for pi are:
Operating status.
dtterm responds with an “OK” message of “Esc [ 0 n”.
(DSR) Cursor position report.
dtterm 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. (DECSTBM) Set top and bottom margins. The default for p1 is 1. The default 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. Valid values for p1 (and any additional arguments) are:
1Restore (de-iconify) window.
2Minimize (iconify) window.
3 ; p2 ; p3Move window to [ p2, p3].
4 ; p2 ; p3Stretch terminal window to height p2, width p3 in pixels.
5Bring the terminal window to the front of the stacking order.
6Bring the terminal window to the back of the stacking order.
7Refresh the terminal window.
8 ; p2 ; p3Stretch terminal window to rows p2, columns p3.
11Report if the terminal window is open or iconic. Returns <<what???>>.
13Report the terminal window’s position. Returns <<what???>>.
14Report the terminal window’s size in pixels. Returns <<what???>>.
18Report the terminal window’s size in characters. Returns <<what???>>.
20Report the terminal window’s icon label. Returns <<what???>>.
21Report the terminal windows title. Returns <<what???>>.
Request terminal arguments. (SM) DEC private set mode. This escape sequences sets DEC private modes. Valid supported values of pi are:
1(DECCKM) Enable cursor keys mode. When cursor keys mode is enabled, the arrow keys send application sequences to the host.
3(DECCOLM) Enable 132-column mode. When 132-column mode is enabled, the number of columns is the terminal win- dow 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.
4(DECSCLM) Enable smooth scrolling. When smooth scrol- ling is enabled, lines are added and the screen is scrolled a sin- gle line at a time.
5(DECSCNM) Enable reverse video. When reverse video mode is enabled, the foreground and background colors of the terminal window are reversed.
6(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 can- not be moved outside the top and bottom margins.
7(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 will be scrolled up 1 line.
8(DECARM) Enable auto-repeat keys.
40Enable 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.
44Enable margin bell. When the margin bell is enabled, the ter- minal emulator’s bell (either audible or visible) is invoked when the cursor is a pre-defined distance from the right mar- gin and a key is pressed.
45Enable reverse-wraparound 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.
46Enable logging. When logging is enabled, all text received from the child process is logged to a file. (SM) DEC private mode reset This escape sequence sets DEC private modes. Valid supported values of pi are:
1(DECCKM) Disable cursor keys mode. When cursor keys mode is disabled, the arrow keys send ANSI cursor sequences to the host.
3(DECCOLM) Disable 132-column mode. When 132-column mode is disabled, the number of columns is the terminal win- dow 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.
4(DECSCLM) Disable smooth scrolling. When smooth scrol- ling 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.
5(DECSCNM) Disable reverse video. When reverse video mode is disabled, the foreground and background colors of the terminal window are not reversed.
6(DECOM) Disable origin mode. When origin mode is dis- abled, 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.
7(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.
8(DECARM) Disable auto-repeat keys.
40Disable DECCOLM escape sequence. When the DEC- COLM 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.
44Disable margin bell. When the margin bell is disabled, the terminal emulator’s bell is not invoked when the cursor is a pre-defined distance from the right margin and a key is pressed.
45Disable reverse-wraparound 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.
46Disable 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 (see below). Valid values for pi are the same as the DEC private modes supported by SM. It is provided to maintain backward compatibility with xterm. 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. Using this escape sequence is discouraged. Set text arguments. This escape sequence allows various terminal emulator text values to be set. Valid supported values of p1 are:
0Change the icon name and window title to P2.
1Change the icon name to P2.
2Change the window title to P2.
3Set 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. ( LS1R) Invoke the G1 Character Set. Turn scrollbar option pi on. Report the status of scrollbar option pi. Turn scrollbar option pi off. (DECSEL) Selective erase in line. The default value is 0. 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 0 argument value erases from the cursor through the end of the line. A 1 argument value erases from the beginning of the line through the cursor. A 2 argument value erases the complete line. (DECSED) Selective erase in display. The default value is 0. This escape sequence only erases erasable characters in the display. Only those characters defined as erasable by the DECSCA escape sequence are erased. A 0 argument value erases from the cursor through the end of the display. A 1 argument value erases from the beginning of the display through cursor position. A 2 argument value erases the complete display. Set window title to text Set icon to icon found in file Set icon to label (DECSTR) Soft terminal reset. 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 |
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 |
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 or DtTerm widget 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 ~ |
The function keys transmits the following escape sequences if Sun function keys mode has been selected either via the dtterm -sk option or the sunFunctionKeys dtterm or DtTerm widget resource.
| 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
SunOS 1.0.1 — Last change: 25 Apr 1994