Skip to content

Modes ​

Terminal modes control global terminal behavior: alternate screen buffer, bracketed paste, mouse tracking, focus events, and auto-wrap. Mode support varies significantly across terminals — mouse tracking modes alone have four variants (X10, normal, button, any-event), and not all terminals implement focus reporting or all bracketed paste edge cases. DEC private modes are the terminal's settings panel, controllable via escape sequences. The alternate screen (?1049) is what makes it possible to run vim and then see your shell exactly as you left it. Bracketed paste mode (?2004) was added decades later to solve a real security problem: without it, pasting rm -rf /\n into a terminal would execute it immediately. With bracketed paste, the terminal wraps pasted text in markers so the shell can distinguish typed input from pasted text. It's one of the few escape sequences born directly from a security vulnerability.

30 features in this category

Analysis2026-11-21

The Modes category covers 30 features. Common gaps: XTPUSHSGR — push SGR stack (CSI # {) (20 terminals fail), XTPOPSGR — pop SGR stack (CSI # }) (20 terminals fail), DECSSCLS — set scroll speed (17 terminals fail). App and headless tests establish different evidence scopes; open individual results for their method and evidence.

Terminal Applications ​

FeatureKittyGhostty (Linux)xtermWezTerm (term) (Linux)iTerm2Ghostty (macOS)WezTerm (term) (macOS)cmuxCursorVS Code (term)Alacritty (term) (Linux)Alacritty (term) (macOS)Terminal.appWarp
Enter alt screen (DECSET 1049)
Exit alt screen (DECRST 1049)
Alt-scroll mouse wheel (?1007)
Alt screen clear-on-exit (?1047)
Save/restore cursor (?1048)
Alt screen legacy (?47)
App cursor keys (DECCKM)
Application keypad (DECKPAM)
Auto-wrap (DECAWM)
Bracketed paste (DECSET 2004)
Mode 2031 color scheme reporting
DECCOLM 80/132 column switch (?3)
DECSCLM — smooth scroll mode
DECSSCLS — set scroll speed
Focus tracking (DECSET 1004)
Insert/replace mode (IRM)
Left/Right Margins (DECLRMM, Mode 69)
All motion mouse (DECSET 1003)
SGR mouse mode (DECSET 1006)
Mouse tracking (DECSET 1000)
Origin mode (DECOM)
Reverse video (DECSCNM)
Synchronized output (DECSET 2026)
UTF-8 mouse mode (?1005)
Pop color palette (CSI # Q)
XTPOPSGR — pop SGR stack (CSI # })
Push color palette (CSI # P)
XTPUSHSGR — push SGR stack (CSI # {)
XTRESTORE — restore DEC private modes (CSI ? Pm r)
XTSAVE — save DEC private modes (CSI ? Pm s)

Headless Backends ​

Headless results describe the recorded parser observation. Open a result to see its method and scope.

Featurevterm.jsKitty (lib)libghostty-vt (native)libghostty-vt (WASM)xterm.jsAlacrittylibvterm (Neovim fork)
Enter alt screen (DECSET 1049)
Exit alt screen (DECRST 1049)
Alt-scroll mouse wheel (?1007)
Alt screen clear-on-exit (?1047)
Save/restore cursor (?1048)
Alt screen legacy (?47)
App cursor keys (DECCKM)
Application keypad (DECKPAM)
Auto-wrap (DECAWM)
Bracketed paste (DECSET 2004)
Mode 2031 color scheme reporting
DECCOLM 80/132 column switch (?3)
DECSCLM — smooth scroll mode
DECSSCLS — set scroll speed
Focus tracking (DECSET 1004)
Insert/replace mode (IRM)
Left/Right Margins (DECLRMM, Mode 69)
All motion mouse (DECSET 1003)
SGR mouse mode (DECSET 1006)
Mouse tracking (DECSET 1000)
Origin mode (DECOM)
Reverse video (DECSCNM)
Synchronized output (DECSET 2026)
UTF-8 mouse mode (?1005)
Pop color palette (CSI # Q)
XTPOPSGR — pop SGR stack (CSI # })
Push color palette (CSI # P)
XTPUSHSGR — push SGR stack (CSI # {)
XTRESTORE — restore DEC private modes (CSI ? Pm r)
XTSAVE — save DEC private modes (CSI ? Pm s)