Skip to content

Reverse video (DECSCNM)

Category: modes · Baseline: core · Tags: DEC Private Modes, VT510 · Specification ↗

ESC [ ? 5 h
DECSCNM (Screen Mode) swaps the default foreground and background colors for the entire screen. Enable with ESC [ ? 5 h, disable with ESC [ ? 5 l. This is a global mode that affects all displayed content, distinct from SGR 7 which only affects individual character cells.
How this is testedautomated
Send \x1b[?5h (DECSCNM), verify reverseVideo mode is active.

The same probe runs against headless backends (via Termless) and real terminal apps (via a daemon launched in each terminal). This lets us distinguish parser correctness from rendering correctness.

Analysis2026-04-06

Supported by all 12 tested terminals — universal adoption. Part of the Core TUI baseline.

Supported by 11 of 14 backends (79%)

Terminal Applications

TerminalVersionSupportNotes
iTerm23.6.9✓ yesDECRPM: mode reset
Ghostty1.3.1✓ yesDECRPM: mode reset
VS Code✓ yes
Warp✓ yes
Cursor✓ yes
Terminal.app✓ yes

Headless Backends

Parser correctness only — a means the parser accepts the sequence.

BackendVersionSupportNotes
vt100.js0.2.1✓ yes
vterm0.2.0✓ yes
WezTerm0.1.0-fork.5✓ yes
Alacritty0.26.0~ partialNot exposed via alacritty_terminal API
Kitty0.40.0~ partialNot exposed via Python batch bridge
xterm.js5.5.0~ partialParser handles DECSCNM but headless mode doesn't expose the state