^[control-codes live in libghostty-vt

Private modes

Settings turned on with CSI ? Pm h (DECSET) and off with CSI ? Pm l (DECRST), each named by a number. The ? marks them as private, apart from the ANSI modes that SM and RM set. A host can ask whether one is set with DECRQM.

The space was DEC’s, and the low numbers are DEC’s modes, with mnemonics such as DECAWM. xterm added its own in the same space, mostly from 1000 up, for things DEC’s terminals never had: the alternate screen, mouse tracking, bracketed paste. Newer terminals have added more, such as synchronized output, 2026. Each page says whose a mode is.

?1049 Alternate Screen CSI ? 1049 h …
DECARM Autorepeat Mode CSI ? 8 h …
DECAWM Autowrap Mode CSI ? 7 h …
?2004 Bracketed Paste CSI ? 2004 h …
DECCOLM Column Mode CSI ? 3 h …
?12 Cursor Blink CSI ? 12 h …
DECHCCM Horizontal Cursor Coupling Mode CSI ? 60 h …
DECCKM Cursor Keys Mode CSI ? 1 h …
?1004 Focus Events CSI ? 1004 h …
DECKBUM Keyboard Usage Mode CSI ? 68 h …
?1000 Mouse Tracking CSI ? 1000 h …
DECNRCM National Replacement Character Set Mode CSI ? 42 h …
DECOM Origin Mode CSI ? 6 h …
DECPEX Print Extent Mode CSI ? 19 h …
DECSCNM Screen Mode CSI ? 5 h …
DECSCLM Scrolling Mode CSI ? 4 h …
?2026 Synchronized Output CSI ? 2026 h …
DECTCEM Text Cursor Enable Mode CSI ? 25 h …