Skip to content

DECSET — Set DEC Private Mode

SequenceCSI ? <Pn>;<Pn>… h
Bytes0x1B 0x5B 0x3F <Pn> 0x68
MnemonicDECSET
Otty support

Description

Enables one or more DEC private modes. Each <Pn> is a numeric mode identifier. Multiple modes can be set in a single sequence with ;-separation.

<Pn>Mode
1Application cursor keys
5Reverse video
6Origin mode (DECOM) — CUP relative to scrolling region
7Auto-wrap (DECAWM)
12Blinking cursor
25Cursor visible (DECTCEM)
47Switch to alternate screen (legacy — no cursor save/clear)
1000Send mouse X/Y on button event
1002Use cell motion mouse tracking
1003Use all motion mouse tracking
1004Send focus in / out events
1006SGR-style mouse reporting
1047Switch to alternate screen (clears it when switched back off)
1049Switch to alternate screen + save cursor
2004Bracketed paste
2026Synchronized output

For a longer table see Sequence Reference → Modes. For how Otty's mode support compares to other terminals, see Terminal Comparison.

Example

bash
printf '\e[?2004h'     # enable bracketed paste
printf '\e[?25l'       # hide cursor (DECRST, same number)
printf '\e[?1049h'     # enter alternate screen (what vim issues at startup)

Try it

  • otty features try bracketed-paste — toggles mode 2004 and demonstrates the \e[200~ … \e[201~ paste wrapping.
  • otty features try sync-update — exercises mode 2026 with two passes (with / without BSU/ESU) so you can spot tearing.
  • otty features try color-scheme-update — subscribes to mode 2031 and prints the \e[?997;Nn reply pattern.
  • DECRST — disable the same modes.
  • Screen — alternate screen details.

Otty