DEC Private Modes
August 5, 2026 · View on GitHub
Terminals have a number of virtual toggle switches called "modes"
which change how the terminal behaves. DEC added its own "private"
(non-standard) modes accessible using the sequence prefix Esc [ ?.
For example, setting mode #3 high will switch the terminal to display 132 columns and resetting it low will switch the terminal back to 80 columns.
Esc [ ? 3 h132-column modeEsc [ ? 3 l80-column mode (that's an "L" as in "low")Esc [ ? 3 $ pPrints the status of private mode #3.
See the script checkmode to check what private modes are available on your terminal.
Supported by the VT340
DEC Private Modes available on the VT340.
Note 1: For a few modes, hackerb9 suggests configuring your VT340 (using the Set-Up button) differently than the factory default.
Note 2: Logging into a UNIX system may change some of these settings
from the power on defaults via the terminfo "reset" sequence. (Try
TERM=vt340 tput reset | cat -v to check.)
| Mode | Description | VT340 default | hackerb9 suggests | Terminfo reset | Notes |
|---|---|---|---|---|---|
| 1 | Application Cursor Key Mode (DECCKM), VT100. | reset | set | When SET, arrow keys send special application commands to the host | |
| 2 | ANSI/VT52 Mode (DECANM), VT100. | set | RESET to enter VT52 mode. To leave VT52 mode, use Esc <. | ||
| 3 | 132 Column Mode (DECCOLM), VT100. | reset | reset | VT340 docs claim DECCOLM is deprecated in favor of DECSCPP (CSI 132 $ ¦). However, DECSCPP sets the columns per page, not screen. Unlike DECCOLM, DECSCPP does not change the visible number of columns on the screen; instead DECSCPP requires horizontal scrolling (see mode 60, DECHCCM). On the VT5x0, see mode 95 (DECNCSM) to prevent the page from being cleared by DECCOLM. | |
| 4 | Smooth (Slow) Scroll (DECSCLM), VT100. | set | reset | reset | On the VT340 and possibly other terminals, this option is not binary. In the SetUp menu, scrolling can be 'Jump' (same as RESET), or 'Smooth-1', '-2', or '-4' which scroll by scanlines instead of character cells. The VT340 factory default is 'Smooth-2', which is 25 scanlines (2.5 text lines) per second. Smooth-1 is half and Smooth-4 is twice the speed. If any of the Smooth options are selected, then the result from DECRQM (Request DEC Private Mode) will show mode 4 as SET. However, when mode 4 is SET using DECSET (CSI ? 4 h), the VT340 always selects Smooth-2. See also the VT5x0's DECSSCLS (Set Scroll Speed, CSI Ps SP p). |
| 5 | Reverse Video Screen (DECSCNM), VT100. | reset | reset | SET is light bg, RESET is dark bg. | |
| 6 | Origin Mode (DECOM), VT100. | reset | |||
| 7 | Auto-Wrap Mode (DECAWM), VT100. | reset | set | set | When RESET, cursor will not advance beyond right-most column. When SET characters beyond the last column will be printed on the next line. |
| 8 | Auto-Repeat Keys (DECARM), VT100. | set | set | ||
| 10 | Edit Mode (DECEDM). | reset | |||
| 11 | Line Transmit Mode (DECLTM). | reset | |||
| 13 | Space compression field delimiter (DECSCFDM) | reset | |||
| 14 | Transmit execution (DECTEM). | set | |||
| 16 | Edit key execution (DECEKEM). | set | When SET, Shift+Edit on the VT340 switches immediately between interactive and edit mode. When RESET, the terminal sends DECEDM to the host to switch modes and waits for the host return DECEDM before changing the terminal's local editing mode. | ||
| 18 | Print Form Feed (DECPFF), VT220. | reset | When SET, the terminal sends a form feed (FF) to the printer at the end of a printing function. The default, RESET, is to send to nothing. DECPFF does not affect the Print Cursor Line function. | ||
| 19 | Set printer extent to full screen (DECPEX), VT220. | set | When RESET, the print page function only prints the scrolling region (data inside the margins). | ||
| 25 | Text cursor enable (DECTCEM), VT220. | set | |||
| 38 | Tektronix mode (DECTEK), VT240, xterm. | reset | |||
| 42 | National Replacement Character sets (DECNRCM), VT220. | permanently reset | On the VT340 and perhaps other terminals, DECNRCM is PERMANENTLY RESET when the Keyboard Dialect selected in the Set Up menu is 'North American'. | ||
| 43 | Graphics Expanded Print Mode (DECGEPM). | reset | |||
| 44 | Graphics Print Color (DECGPCM) | reset | set | ||
| 45 | Graphics Print Color Syntax (DECGPCS). | reset | set | ||
| 46 | Graphics Print Background (DECGPBM). | set | |||
| 47 | Graphics Rotated Print Mode (DECGRPM). | reset | |||
| 53 | VT131 transmit (DEC131TM). | reset | For local editing, if both the Line Transmit Mode (DECLTM) and the Transmit Termination Mode (ANSI TTM) are RESET, then this mode controls the character block size. If SET, use VT131 partial page (last marker to cursor). If RESET, use ANSI partial page (selected text)." | ||
| 60 | Horizontal cursor coupling (DECHCCM). | reset | |||
| 61 | Vertical cursor coupling (DECVCCM). | set | |||
| 64 | Page cursor coupling (DECPCCM). | set | |||
| 66 | Application/Numeric keypad mode (DECNKM), VT320 | reset | |||
| 67 | Backarrow key sends backspace (DECBKM), VT340, VT420, VT520. | reset | When RESET (the default), backarrow key sends delete. | ||
| 68 | Keyboard Usage: Data Processing or Typewriter Keys (DECKBUM). | reset | Data Processing characters are printed on the right half of the keycaps. According to ek-520-rm, 'If you use the North American language, then DECKBUM should always be RESET (typewriter). For all other languages, you can use either mode.' | ||
| 73 | Transmit rate limiting (DECXRLM). | set | |||
| 80 | Sixel Display Mode (DECSDM). | reset |
Not recognized on the VT340
Private Modes known to the checkmode program, but unavailable on the VT340.
| Mode | Description | Notes |
|---|---|---|
| 0 | Invalid mode | Use of mode #0 is an error and always ignored. |
| 9 | Send Mouse X & Y on button press, X10 XTerm. | VT100 used mode 9 for interlace, but dropped it in VT200+. |
| 12 | Katakana Shift Mode (DECKANAM), VT382-J | |
| 20 | Overstrike Mode (OS), VK100. | |
| 21 | Local BASIC Mode (BA), VK100. | |
| 22 | Host BASIC Mode (BA), VK100. | |
| 23 | Programmed Keypad Mode (PK), VK100. | |
| 24 | Auto Hardcopy Mode (AH), VK100. | |
| 27 | Proportional Spacing, printers. | |
| 29 | Pitch Select Mode, printers. | |
| 30 | Show scrollbar, rxvt. | |
| 34 | Cursor direction, right to left. | |
| 35 | Hebrew keyboard mapping. | ek-vt3xx-tp is in error. DECTEK is actually 38. |
| 36 | Hebrew encoding mode. | |
| 40 | Carriage Return/New Line Mode (DECCRNLM), printers. | Allow DECCOLM (mode 3) to switch columns. |
| 41 | Unidirectional Print Mode (DECUPM), printers. | Bidirectional when RESET. |
| 49 | Thai Keyboard Input Mode (DECTHAIM), VT382-T | |
| 50 | Thai Cursor Mode (DECTHAICM), VT382-T | SET is internal cursor, RESET is physical cursor |
| 57 | North American / Greek keyboard mapping (DECNAKB) | |
| 58 | IBM ProPrinter Emulation (DECIPEM) | Interpret subsequent data according to the IBM ProPrinter protocol syntax instead of the DEC protocol. |
| 59 | Kanji/Katakana Display Mode (DECKKDM), VT382-J | |
| 69 | Vertical split screen / Left and right margin mode (DECVSSM/DECLRMM), VT420 and up. | |
| 81 | Keyboard sends key position reports instead of character codes (DECKPM). | |
| 90 | Thai Space Compensating Mode (DECTHAISCM), VT382-T | |
| 95 | Do not clear screen when DECCOLM is set/reset (DECNCSM), VT510 and up. | |
| 96 | Perform a copy/paste from right-to-left (DECRLCM), VT520 | Only valid with Hebrew keyboard language, see DEC mode 35 |
| 97 | CRT Save Mode (DECCRTSM), VT520 | |
| 98 | Auto-resize the number of lines-per-page when the page arrangement changes (DECARSM), VT520 | |
| 99 | Modem Control Mode: require DSR or CTS before communicating (DECMCM), VT520 | |
| 100 | Send automatic answerback message 500ms after a communication line connection is made (DECAAM), VT520 | |
| 101 | Conceal Answerback Message (DECCANSM), VT520 | |
| 102 | Discard NUL characters upon receipt, or pass them on to the printer (DECNULM) | |
| 103 | Half-Duplex Mode (DECHDPXM), VT520 | |
| 104 | Enable Secondary Keyboard Language (DECESKM), VT520 | |
| 106 | Overscan mode for monochrome VT520 terminal (DECOSCNM) | |
| 108 | Num Lock Mode of keyboard (DECNUMLK) | |
| 109 | Caps Lock Mode of keyboard (DECCAPSLK) | |
| 110 | Keyboard LED's Host Indicator Mode (DECKLHIM) | |
| 111 | Framed Windows with title bars, borders, and icons (DECFWM), VT520 | |
| 112 | Allow user to Review Previous Lines that have scrolled off the top (DECRPL) | |
| 113 | Host Wake-up Mode, CRT and Energy Saver (DECHWUM), VT520 | |
| 114 | Use an alternate text color for underlined text (DECATCUM), VT520 | |
| 115 | Use an alternate text color for blinking text (DECATCMB), VT520 | |
| 116 | Bold and blink styles affect background as well as foreground (DECBSM), VT520 | |
| 117 | Erase Color is screen background (VT) or text background (PC) (DECECM), VT520 | Background color used when text is erased or new text is scrolled on to the screen |
| 1000 | Send Mouse X & Y on button press and release. (X11 XTerm mouse). | |
| 1001 | Use Hilite Mouse Tracking, xterm. | |
| 1002 | Use Cell Motion Mouse Tracking, xterm. | |
| 1003 | Use All Motion Mouse Tracking, xterm. | |
| 1004 | Send FocusIn/FocusOut events, xterm. | |
| 1005 | UTF-8 Mouse Mode, xterm. | |
| 1006 | SGR Mouse Mode, xterm. | |
| 1007 | Alternate Scroll Mode, xterm. | |
| 1010 | Scroll to bottom on tty output, rxvt. | |
| 1011 | Scroll to bottom on key press, rxvt. | |
| 1015 | Urxvt Mouse Mode, rxvt. | |
| 1016 | SGR Mouse PixelMode, xterm. | |
| 1021 | High intensity bold/blink color, rxvt. | |
| 1034 | Interpret 'Meta' key, xterm. | This sets the eighth bit of keyboard input. |
| 1035 | Enable special modifiers for Alt and NumLock keys, xterm. | |
| 1036 | Send ESC when Meta modifies a key, xterm. | |
| 1037 | Send DEL from the editing-keypad Delete key, xterm. | |
| 1039 | Send ESC when Alt modifies a key, xterm. | |
| 1040 | Keep selection even if not highlighted, xterm. | |
| 1041 | Use the CLIPBOARD selection, xterm. | |
| 1042 | Enable Urgency windowmanager hint when Control-G received, xterm. | |
| 1043 | Enable raising of the window when Control-G is received, xterm. | |
| 1044 | Reuse the most recent data copied to CLIPBOARD, xterm | |
| 1046 | Enable switching to/from Alternate Screen Buffer, xterm. | |
| 1047 | Use Alternate Screen Buffer, xterm. | |
| 1048 | Save cursor as in DECSC, xterm. | |
| 1049 | Save cursor as in DECSC, switch to the Alternate Screen Buffer. | |
| 1050 | Set terminfo/termcap function-key mode, xterm. | |
| 1051 | Set Sun function-key mode, xterm. | |
| 1052 | Set HP function-key mode, xterm. | |
| 1053 | Set SCO function-key mode, xterm. | |
| 1060 | Set legacy keyboard emulation, i.e, X11R6, xterm. | |
| 1061 | Set VT220 keyboard emulation, xterm. | |
| 1070 | Use private color registers for each graphic, xterm. | When SET, each Sixel/ReGIS graphic gets a fresh palette. When RESET, colormap changes persist just like on a true VT340. SET is the default for XTerm. |
| 2004 | Set bracketed paste mode, xterm. | |
| 2026 | Synchronized output. iTerm2, Contour, Kitty. | When SET, new data is not displayed until the mode is RESET. Can be used by applications for double-buffering & page flipping to prevent screen tearing. |
| 8452 | Sixel leaves cursor right of image, RLogin, xterm. |
No undocumented private modes
Using checkmode --trawl, private modes 0 to 9999 were
queried and hackerb9's VT340 replied "not recognized" for any numbers
not listed in the documentation.