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 h 132-column mode
  • Esc [ ? 3 l 80-column mode (that's an "L" as in "low")
  • Esc [ ? 3 $ p Prints 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.)

ModeDescriptionVT340 defaulthackerb9 suggestsTerminfo resetNotes
1Application Cursor Key Mode (DECCKM), VT100.resetsetWhen SET, arrow keys send special application commands to the host
2ANSI/VT52 Mode (DECANM), VT100.setRESET to enter VT52 mode. To leave VT52 mode, use Esc <.
3132 Column Mode (DECCOLM), VT100.resetresetVT340 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.
4Smooth (Slow) Scroll (DECSCLM), VT100.setresetresetOn 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).
5Reverse Video Screen (DECSCNM), VT100.resetresetSET is light bg, RESET is dark bg.
6Origin Mode (DECOM), VT100.reset
7Auto-Wrap Mode (DECAWM), VT100.resetsetsetWhen RESET, cursor will not advance beyond right-most column. When SET characters beyond the last column will be printed on the next line.
8Auto-Repeat Keys (DECARM), VT100.setset
10Edit Mode (DECEDM).reset
11Line Transmit Mode (DECLTM).reset
13Space compression field delimiter (DECSCFDM)reset
14Transmit execution (DECTEM).set
16Edit key execution (DECEKEM).setWhen 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.
18Print Form Feed (DECPFF), VT220.resetWhen 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.
19Set printer extent to full screen (DECPEX), VT220.setWhen RESET, the print page function only prints the scrolling region (data inside the margins).
25Text cursor enable (DECTCEM), VT220.set
38Tektronix mode (DECTEK), VT240, xterm.reset
42National Replacement Character sets (DECNRCM), VT220.permanently resetOn the VT340 and perhaps other terminals, DECNRCM is PERMANENTLY RESET when the Keyboard Dialect selected in the Set Up menu is 'North American'.
43Graphics Expanded Print Mode (DECGEPM).reset
44Graphics Print Color (DECGPCM)resetset
45Graphics Print Color Syntax (DECGPCS).resetset
46Graphics Print Background (DECGPBM).set
47Graphics Rotated Print Mode (DECGRPM).reset
53VT131 transmit (DEC131TM).resetFor 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)."
60Horizontal cursor coupling (DECHCCM).reset
61Vertical cursor coupling (DECVCCM).set
64Page cursor coupling (DECPCCM).set
66Application/Numeric keypad mode (DECNKM), VT320reset
67Backarrow key sends backspace (DECBKM), VT340, VT420, VT520.resetWhen RESET (the default), backarrow key sends delete.
68Keyboard Usage: Data Processing or Typewriter Keys (DECKBUM).resetData 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.'
73Transmit rate limiting (DECXRLM).set
80Sixel Display Mode (DECSDM).reset

Not recognized on the VT340

Private Modes known to the checkmode program, but unavailable on the VT340.

ModeDescriptionNotes
0Invalid modeUse of mode #0 is an error and always ignored.
9Send Mouse X & Y on button press, X10 XTerm.VT100 used mode 9 for interlace, but dropped it in VT200+.
12Katakana Shift Mode (DECKANAM), VT382-J
20Overstrike Mode (OS), VK100.
21Local BASIC Mode (BA), VK100.
22Host BASIC Mode (BA), VK100.
23Programmed Keypad Mode (PK), VK100.
24Auto Hardcopy Mode (AH), VK100.
27Proportional Spacing, printers.
29Pitch Select Mode, printers.
30Show scrollbar, rxvt.
34Cursor direction, right to left.
35Hebrew keyboard mapping.ek-vt3xx-tp is in error. DECTEK is actually 38.
36Hebrew encoding mode.
40Carriage Return/New Line Mode (DECCRNLM), printers.Allow DECCOLM (mode 3) to switch columns.
41Unidirectional Print Mode (DECUPM), printers.Bidirectional when RESET.
49Thai Keyboard Input Mode (DECTHAIM), VT382-T
50Thai Cursor Mode (DECTHAICM), VT382-TSET is internal cursor, RESET is physical cursor
57North American / Greek keyboard mapping (DECNAKB)
58IBM ProPrinter Emulation (DECIPEM)Interpret subsequent data according to the IBM ProPrinter protocol syntax instead of the DEC protocol.
59Kanji/Katakana Display Mode (DECKKDM), VT382-J
69Vertical split screen / Left and right margin mode (DECVSSM/DECLRMM), VT420 and up.
81Keyboard sends key position reports instead of character codes (DECKPM).
90Thai Space Compensating Mode (DECTHAISCM), VT382-T
95Do not clear screen when DECCOLM is set/reset (DECNCSM), VT510 and up.
96Perform a copy/paste from right-to-left (DECRLCM), VT520Only valid with Hebrew keyboard language, see DEC mode 35
97CRT Save Mode (DECCRTSM), VT520
98Auto-resize the number of lines-per-page when the page arrangement changes (DECARSM), VT520
99Modem Control Mode: require DSR or CTS before communicating (DECMCM), VT520
100Send automatic answerback message 500ms after a communication line connection is made (DECAAM), VT520
101Conceal Answerback Message (DECCANSM), VT520
102Discard NUL characters upon receipt, or pass them on to the printer (DECNULM)
103Half-Duplex Mode (DECHDPXM), VT520
104Enable Secondary Keyboard Language (DECESKM), VT520
106Overscan mode for monochrome VT520 terminal (DECOSCNM)
108Num Lock Mode of keyboard (DECNUMLK)
109Caps Lock Mode of keyboard (DECCAPSLK)
110Keyboard LED's Host Indicator Mode (DECKLHIM)
111Framed Windows with title bars, borders, and icons (DECFWM), VT520
112Allow user to Review Previous Lines that have scrolled off the top (DECRPL)
113Host Wake-up Mode, CRT and Energy Saver (DECHWUM), VT520
114Use an alternate text color for underlined text (DECATCUM), VT520
115Use an alternate text color for blinking text (DECATCMB), VT520
116Bold and blink styles affect background as well as foreground (DECBSM), VT520
117Erase Color is screen background (VT) or text background (PC) (DECECM), VT520Background color used when text is erased or new text is scrolled on to the screen
1000Send Mouse X & Y on button press and release. (X11 XTerm mouse).
1001Use Hilite Mouse Tracking, xterm.
1002Use Cell Motion Mouse Tracking, xterm.
1003Use All Motion Mouse Tracking, xterm.
1004Send FocusIn/FocusOut events, xterm.
1005UTF-8 Mouse Mode, xterm.
1006SGR Mouse Mode, xterm.
1007Alternate Scroll Mode, xterm.
1010Scroll to bottom on tty output, rxvt.
1011Scroll to bottom on key press, rxvt.
1015Urxvt Mouse Mode, rxvt.
1016SGR Mouse PixelMode, xterm.
1021High intensity bold/blink color, rxvt.
1034Interpret 'Meta' key, xterm.This sets the eighth bit of keyboard input.
1035Enable special modifiers for Alt and NumLock keys, xterm.
1036Send ESC when Meta modifies a key, xterm.
1037Send DEL from the editing-keypad Delete key, xterm.
1039Send ESC when Alt modifies a key, xterm.
1040Keep selection even if not highlighted, xterm.
1041Use the CLIPBOARD selection, xterm.
1042Enable Urgency windowmanager hint when Control-G received, xterm.
1043Enable raising of the window when Control-G is received, xterm.
1044Reuse the most recent data copied to CLIPBOARD, xterm
1046Enable switching to/from Alternate Screen Buffer, xterm.
1047Use Alternate Screen Buffer, xterm.
1048Save cursor as in DECSC, xterm.
1049Save cursor as in DECSC, switch to the Alternate Screen Buffer.
1050Set terminfo/termcap function-key mode, xterm.
1051Set Sun function-key mode, xterm.
1052Set HP function-key mode, xterm.
1053Set SCO function-key mode, xterm.
1060Set legacy keyboard emulation, i.e, X11R6, xterm.
1061Set VT220 keyboard emulation, xterm.
1070Use 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.
2004Set bracketed paste mode, xterm.
2026Synchronized 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.
8452Sixel 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.