ECMA-48 vs xterm-ctlseqs vs vendor extensions
Not every escape sequence on this site is equally portable. ECMA-48 (ISO/IEC 6429, 1976) is the lingua franca — anywhere a terminal claims ANSI support, these work. xterm-ctlseqs is the de-facto second tier — every xterm-family emulator implements it, but it's not part of ISO 6429. Vendor extensions (kitty graphics, DEC sixel, iTerm2 / Windows Terminal proprietary OSCs, contour synchronized output, hyperlink OSC 8) cover the long tail where portability is per-terminal. This page sorts every sequence on the site into one of those three tiers, so you can tell at a glance what's safe to emit unconditionally vs. what needs a capability probe.
How to read this page
- ECMA-48 Defined in ECMA-48 / ISO 6429. Portable to every ANSI-aware terminal — Linux console fbcon, macOS Terminal, Windows ConPTY, every xterm-family emulator. Safe to emit unconditionally.
- xterm-ctlseqs Defined in xterm-ctlseqs (or aixterm bright-colour extension). Universally supported across xterm-family terminals (xterm, kitty, alacritty, wezterm, iTerm2, ghostty, Windows Terminal, macOS Terminal, gnome-terminal, konsole) but not on the bare Linux console or in plain VT100/VT220 hardware terminals. Safe in any modern terminal emulator.
- vendor Defined by a specific vendor or proposal: DEC's VT manuals (sixel, DECSC/DECRC), Kitty's graphics protocol, iTerm2 / Windows Terminal proprietary OSCs, the contour synchronized-output proposal, the gnome-terminal hyperlink proposal (since adopted by most). Probe before you emit, or accept that it's a no-op on terminals that don't recognise it.
Counts shown next to each tag are how many sequences in this site's corpus fall into that bucket. The per-row Spec column reproduces the citation that classifies each sequence — the same string that appears on the sequence's own page.
ECMA-48 / ISO 6429 — the portable layer
Sequences whose canonical citation is ECMA-48 (or its underlying ASCII / ECMA-6 standard for C0 controls). ISO 6429 has been frozen since 1976 in spirit and 1991 in its current published form — these sequences predate the xterm corpus and are implemented by every terminal that does anything more than dumb text output.
| Sequence | Family | Bytes | Spec citation |
|---|---|---|---|
| SGR 0 — Reset / Normal | SGR | \x1b[0m | ECMA-48 §8.3.117 (SGR) |
| SGR 1 — Bold / Increased intensity | SGR | \x1b[1m | ECMA-48 §8.3.117 (SGR parameter 1) |
| SGR 2 — Dim / Faint | SGR | \x1b[2m | ECMA-48 §8.3.117 (SGR parameter 2) |
| SGR 5 — Blink (slow) | SGR | \x1b[5m | ECMA-48 §8.3.117 (SGR parameter 5) |
| SGR 8 — Conceal / Hidden | SGR | \x1b[8m | ECMA-48 §8.3.117 (SGR parameter 8) |
| SGR 9 — Strikethrough | SGR | \x1b[9m | ECMA-48 §8.3.117 (SGR parameter 9) |
| SGR 39 — Default foreground color | SGR | \x1b[39m | ECMA-48 §8.3.117 (SGR parameter 39) |
| SGR 49 — Default background color | SGR | \x1b[49m | ECMA-48 §8.3.117 (SGR parameter 49) |
| SGR 3 — Italic | SGR | \x1b[3m | ECMA-48 §8.3.117 (SGR parameter 3) |
| SGR 4 — Underline | SGR | \x1b[4m | ECMA-48 §8.3.117 (SGR parameter 4); kitty underline extensions |
| SGR 7 — Reverse video | SGR | \x1b[7m | ECMA-48 §8.3.117 (SGR parameter 7) |
| SGR 30–37 — Foreground color (8 basic) | SGR | \x1b[31m (red, similarly 30–37) | ECMA-48 §8.3.117 (SGR parameters 30–37, 39) |
| SGR 40–47 — Background color (8 basic) | SGR | \x1b[41m (red bg, 40–47) | ECMA-48 §8.3.117 (SGR parameters 40–47, 49) |
| CUU / CUD / CUF / CUB — Move cursor | CSI | \x1b[NA (up; B down, C right, D left) | ECMA-48 §8.3.22 (CUU) / §8.3.19 (CUD) / §8.3.20 (CUF) / §8.3.18 (CUB) |
| CNL / CPL — Cursor next / previous line | CSI | \x1b[NE (down N lines, col 1) \x1b[NF (up) | ECMA-48 §8.3.13 (CNL) / §8.3.27 (CPL) |
| CHA — Cursor horizontal absolute (column) | CSI | \x1b[NG | ECMA-48 §8.3.9 (CHA) |
| CUP — Set cursor position | CSI | \x1b[row;colH | ECMA-48 §8.3.21 (CUP) |
| ED — Erase in display (\x1b[2J clear screen) | CSI | \x1b[NJ | ECMA-48 §8.3.39 (ED) |
| EL — Erase in line (\x1b[K) | CSI | \x1b[NK | ECMA-48 §8.3.41 (EL) |
| SU / SD — Scroll up / down | CSI | \x1b[NS (scroll up) \x1b[NT (scroll down) | ECMA-48 §8.3.147 (SU) / §8.3.113 (SD) |
| RIS — Reset to Initial State (full terminal reset) | ESC | \x1bc | ECMA-48 §8.3.105 (RIS) / xterm-ctlseqs (ESC c) |
| C0 controls — BS, HT, LF, CR, BEL (single-byte codes) | C0 | \x08 BS \x09 HT \x0a LF \x0d CR \x07 BEL | ECMA-48 §8.2 (C0 set) / ASCII / ECMA-6 |
| CBT — Cursor Backward Tabulation (CSI Z) | CSI | \x1b[NZ | ECMA-48 §8.3.7 (CBT) |
| TBC — Tab Clear (CSI g) | CSI | \x1b[g (clear current) \x1b[3g (clear all) | ECMA-48 §8.3.154 (TBC) |
| HTS — Horizontal Tab Set (ESC H) | ESC | \x1bH | ECMA-48 §8.3.62 (HTS) |
| CHT — Cursor Forward Tabulation (CSI I) | CSI | \x1b[NI | ECMA-48 §8.3.10 (CHT) |
| DA — Device Attributes (CSI c / CSI > c) | CSI | \x1b[c (primary DA) \x1b[>c (secondary DA) | ECMA-48 §8.3.24 (DA) / xterm-ctlseqs |
| DSR — Device Status Report (CSI 5n / CSI 6n) | CSI | \x1b[5n (status request) \x1b[6n (cursor pos request) | ECMA-48 §8.3.35 (DSR) / xterm-ctlseqs |
| ICH — Insert Character (CSI Pn @) | CSI | \x1b[Pn@ | ECMA-48 §8.3.64 (ICH) |
| DCH — Delete Character (CSI Pn P) | CSI | \x1b[PnP | ECMA-48 §8.3.26 (DCH) |
| IL — Insert Line (CSI Pn L) | CSI | \x1b[PnL | ECMA-48 §8.3.67 (IL) |
| DL — Delete Line (CSI Pn M) | CSI | \x1b[PnM | ECMA-48 §8.3.32 (DL) |
| ECH — Erase Character (CSI Pn X) | CSI | \x1b[PnX | ECMA-48 §8.3.38 (ECH) |
| REP — Repeat Preceding Character (CSI Pn b) | CSI | \x1b[Pnb | ECMA-48 §8.3.103 (REP) |
| C1 controls — 8-bit single-byte equivalents of ESC sequences (0x80–0x9F) | ESC | \x9b CSI \x9d OSC \x9c ST \x90 DCS \x85 NEL \x88 HTS \x84 IND \x8d RI | ECMA-48 §5.2 (C1 set) / ISO 6429 |
| SGR 21 — Doubly underlined | SGR | \x1b[21m | ECMA-48 §8.3.117 (SGR parameter 21) |
| SGR 53 — Overlined | SGR | \x1b[53m | ECMA-48 §8.3.117 (SGR parameter 53) |
| SGR 26 — Proportional spacing (ECMA-48; ignored by every common terminal) | SGR | \x1b[26m | ECMA-48 §8.3.117 (SGR parameter 26) |
| VPA — Vertical line position absolute (CSI d) | CSI | \x1b[<row>d | ECMA-48 §8.3.158 (VPA) / xterm-ctlseqs |
| HVP — Horizontal and vertical position (CSI f, alias of CUP) | CSI | \x1b[<row>;<col>f | ECMA-48 §8.3.61 (HVP) / xterm-ctlseqs |
| SL / SR — Scroll left / right (CSI Ps SP @ / CSI Ps SP A) | CSI | \x1b[<Ps> @ (SL) \x1b[<Ps> A (SR) | ECMA-48 §8.3.121 (SL) / §8.3.135 (SR) / xterm-ctlseqs |
| HPA / HPR / VPR — Position absolute & relative (CSI ` / CSI a / CSI e) | CSI | \x1b[<col>` (HPA) \x1b[<n>a (HPR) \x1b[<n>e (VPR) | ECMA-48 §8.3.57 (HPA) / §8.3.59 (HPR) / §8.3.160 (VPR) |
| APC — Application Program Command (`ESC _ … ESC \\` / `\x9F … \x9C`) | ESC | \x1b_<body>\x1b\\ (7-bit) \x9f<body>\x9c (8-bit C1) | ECMA-48 §8.3.2 (APC) / xterm-ctlseqs (APC) / Kitty graphics protocol |
| CSI Ps i — Media Copy (MC) — printer-on / printer-off / print line | CSI | \x1b[0i / \x1b[4i / \x1b[5i / \x1b[?4i / \x1b[?5i | ECMA-48 §8.3.82 (MC) / xterm-ctlseqs (CSI Ps i, CSI ? Ps i) |
xterm-ctlseqs — the de-facto modern terminal layer
Sequences defined in the xterm Control Sequences reference (xterm-ctlseqs), or in aixterm's bright-colour extension that xterm-ctlseqs incorporates. These are not in ISO 6429 but every xterm-family emulator (kitty, alacritty, wezterm, iTerm2, ghostty, Windows Terminal, macOS Terminal, gnome-terminal, konsole, Konsole, Hyper) implements them. DEC private modes (?1049, ?25, ?2004, ?1004 …) and most OSC sequences live here.
| Sequence | Family | Bytes | Spec citation |
|---|---|---|---|
| SGR 48;5;n — 256-color background | SGR | \x1b[48;5;Nm | xterm-ctlseqs (256-color extension) |
| SGR 90–97 — Bright foreground color | SGR | \x1b[91m (bright red, 90–97) | aixterm color extension (xterm-ctlseqs) |
| SGR 100–107 — Bright background color | SGR | \x1b[101m (bright red bg, 100–107) | aixterm color extension |
| SGR 38;5;n — 256-color foreground | SGR | \x1b[38;5;Nm | xterm-ctlseqs (256-color extension) |
| DECSET 1049 — Alternate screen buffer | DEC | \x1b[?1049h (enter) \x1b[?1049l (leave) | xterm-ctlseqs (Private modes) |
| DECTCEM ?25 — Show/hide cursor | DEC | \x1b[?25h (show) \x1b[?25l (hide) | xterm-ctlseqs (DECTCEM) |
| DECSET ?2004 — Bracketed paste mode | DEC | \x1b[?2004h (enable) \x1b[?2004l (disable) | xterm-ctlseqs (Private mode 2004) |
| DECSET ?1000 / ?1006 — Mouse tracking | DEC | \x1b[?1000h (click only) \x1b[?1002h (cell drag) \x1b[?1003h (any motion) \x1b[?1006h (SGR encoding) | xterm-ctlseqs (Mouse Tracking) |
| OSC 0 / 2 — Set window/icon title | OSC | \x1b]0;TITLE\x07 | xterm-ctlseqs (OSC 0/1/2) |
| DECAWM ?7 — Auto-wrap mode | DEC | \x1b[?7h (enable wrap) \x1b[?7l (disable) | xterm-ctlseqs (DEC Private Mode 7, DECAWM) |
| DECSET ?1004 — Focus in/out events | DEC | \x1b[?1004h (enable) \x1b[?1004l (disable) | xterm-ctlseqs (Private mode 1004) |
| DECSCUSR — Cursor shape | CSI | \x1b[N\x20q (N = 0..6) | xterm-ctlseqs (DECSCUSR, CSI Ps SP q) |
| OSC 10 / 11 — Set default foreground / background color | OSC | \x1b]10;#RRGGBB\x07 (set fg) \x1b]11;#RRGGBB\x07 (set bg) | xterm-ctlseqs (OSC 10 / 11 / 110 / 111) |
| OSC 52 — System clipboard read/write | OSC | \x1b]52;c;BASE64\x07 (set clipboard 'c' to BASE64 decoded bytes) | xterm-ctlseqs (OSC 52) |
| DECSTR — Soft terminal reset | CSI | \x1b[!p | xterm-ctlseqs (DECSTR, CSI ! p) |
| DECSTBM — Set Top/Bottom Margins (CSI r) | CSI | \x1b[T;Br | xterm-ctlseqs (DECSTBM, CSI Ps ; Ps r) |
| SCOSC / SCORC — Save / Restore cursor (CSI s / u) | CSI | \x1b[s (save) \x1b[u (restore) | xterm-ctlseqs (SCOSC / SCORC, CSI s / u) |
| OSC 4 — Set palette colour (and query) | OSC | \x1b]4;N;#RRGGBB\x07 (set) \x1b]4;N;?\x07 (query) | xterm-ctlseqs (OSC 4) |
| DECSET ?12 — Cursor blink | DEC | \x1b[?12h (start blinking) \x1b[?12l (stop blinking) | xterm-ctlseqs (Private mode 12) |
| DECRQM — Request Mode Status (CSI ? Ps $ p) | CSI | \x1b[?Ps$p | xterm-ctlseqs (DECRQM, CSI ? Ps $ p) |
| OSC 110 / 111 / 112 — Reset default fg / bg / cursor colour | OSC | \x1b]110\x07 (reset fg) \x1b]111\x07 (reset bg) \x1b]112\x07 (reset cursor) | xterm-ctlseqs (OSC 110 / 111 / 112) |
| DECOM ?6 — Origin mode (clip cursor addressing to scroll region) | DEC | \x1b[?6h (origin = region) \x1b[?6l (origin = screen) | xterm-ctlseqs (DECOM, Private mode 6) |
| DECSET ?1047 — Alt screen without cursor save | DEC | \x1b[?1047h (enter alt) \x1b[?1047l (leave alt) | xterm-ctlseqs (Private mode 1047) |
| DECRQSS — Request Selection or Setting (DCS $ q ... ST) | DCS | \x1bP$q<P>\x1b\\ | xterm-ctlseqs (DECRQSS, DCS $ q Pt ST) |
| XTGETTCAP — Request terminfo capability (DCS + q ... ST) | DCS | \x1bP+q<HEX-NAME>;<HEX-NAME>...\x1b\\ | xterm-ctlseqs (XTGETTCAP, DCS + q Pt ST) |
| OSC 12 — Set cursor colour (and query) | OSC | \x1b]12;#RRGGBB\x07 (set) \x1b]12;?\x07 (query) | xterm-ctlseqs (OSC 12 / 112) |
| OSC 17 — Set highlight (selection) background colour | OSC | \x1b]17;#RRGGBB\x07 (set) \x1b]17;?\x07 (query) | xterm-ctlseqs (OSC 17 / 117) |
| OSC 19 — Set highlight (selection) foreground colour | OSC | \x1b]19;#RRGGBB\x07 (set) \x1b]19;?\x07 (query) | xterm-ctlseqs (OSC 19 / 119) |
| OSC 104 — Reset palette colour (one index or all) | OSC | \x1b]104;N\x07 (reset index N) \x1b]104\x07 (reset all) | xterm-ctlseqs (OSC 104) |
| OSC 1 — Set icon name (separate from window title) | OSC | \x1b]1;ICON-NAME\x07 | xterm-ctlseqs (OSC 1) |
| OSC 22 — Set X11 mouse pointer / cursor name | OSC | \x1b]22;CURSOR-NAME\x07 | xterm-ctlseqs (OSC 22) |
| OSC 50 — Set or query font (xterm font selector) | OSC | \x1b]50;FONT-SPEC\x07 (set) \x1b]50;?\x07 (query) | xterm-ctlseqs (OSC 50) |
| XTWINOPS — Window manipulation (CSI Ps ; Ps ; Ps t) | CSI | \x1b[<Ps>t or \x1b[<Ps>;<Pa>;<Pb>t | xterm-ctlseqs (XTWINOPS) / DECSLPP partial overlap |
| XTPUSHCOLORS / XTPOPCOLORS / XTREPORTCOLORS — Palette stack (CSI # P / # Q / # R) | CSI | \x1b[#P (push) \x1b[#Q (pop) \x1b[#R (report) | xterm-ctlseqs (XTPUSHCOLORS / XTPOPCOLORS / XTREPORTCOLORS) |
| XTMODKEYS — Modify keyboard reporting (CSI > Pp ; Pv m) | CSI | \x1b[><Pp>;<Pv>m | xterm-ctlseqs (XTMODKEYS) |
| XTSMTITLE / XTRMTITLE — Set / reset title display modes (CSI > Ps ; … t / T) | CSI | \x1b[><Ps>;<Ps>…t (set) \x1b[><Ps>;<Ps>…T (reset) | xterm-ctlseqs (XTSMTITLE / XTRMTITLE) |
| SGR / urxvt mouse encoding — Mouse-report wire formats (CSI M / CSI < / CSI) | CSI | \x1b[M<Cb><Cx><Cy> (legacy) \x1b[<<Cb>;<Cx>;<Cy>M|m (SGR ?1006) \x1b[<Cb>;<Cx>;<Cy>M (urxvt ?1015) | xterm-ctlseqs (Mouse Tracking) |
| XTVERSION — Report terminal name and version (CSI > Pp q) | CSI | \x1b[>0q (query) reply: \x1bP>|<name> <version>\x1b\\ | xterm-ctlseqs (Tertiary DA / XTVERSION) |
| XTSMGRAPHICS — Sixel / ReGIS / color-register capacity query + set (CSI ? Pi ; Pa ; Pv S) | CSI | \x1b[?<Pi>;<Pa>;<Pv>S | xterm-ctlseqs (XTSMGRAPHICS) |
| XTQMODKEYS — Query modifyKeys current value (CSI ? Pp m) | CSI | \x1b[?<Pp>m | xterm-ctlseqs (XTQMODKEYS) |
| XTPUSHSGR / XTPOPSGR / XTREPORTSGR — SGR stack (CSI Ps + p / + q / + r) | CSI | \x1b[#{ (XTPUSHSGR, alt: CSI Pm + p) \x1b[#} (XTPOPSGR, alt: CSI + q) \x1b[+r (XTREPORTSGR) | xterm-ctlseqs (XTPUSHSGR / XTPOPSGR / XTREPORTSGR) |
| OSC 10 / 11 / 12 query — Detect default fg / bg / cursor color (dark vs light) | OSC | \x1b]10;?\x07 (fg) \x1b]11;?\x07 (bg) \x1b]12;?\x07 (cursor) | xterm-ctlseqs (OSC 10 / 11 / 12 query) |
| OSC 4 query — Read 256-color palette index (`\x1b]4;<n>;?\x07`) | OSC | \x1b]4;<n>;?\x07 | xterm-ctlseqs (OSC 4 query) |
| DECSCUSR query via DECRQSS — Read the current cursor shape (`\x1bP$q q\x1b\\`) | DCS | \x1bP$q q\x1b\\ | xterm-ctlseqs (DECRQSS + DECSCUSR) |
| Secondary DA reply decoder — `CSI > Pp ; Pv ; Pc c` model / firmware / cart | CSI | \x1b[>Pp;Pv;Pcc | xterm-ctlseqs (Secondary DA reply) / DEC VT320+ DA2 |
| XTSAVE / XTRESTORE — Save / restore DEC private mode (`CSI ? Pm s` / `CSI ? Pm r`) | CSI | \x1b[?<Pm>s (save) \x1b[?<Pm>r (restore) | xterm-ctlseqs (XTSAVE / XTRESTORE — CSI ? Pm s / r) |
| DECRPM decoder — parsing the DECRQM reply (`CSI ? Ps ; Pm $ y`) | CSI | \x1b[?<Ps>;<Pm>$y (private) \x1b[<Ps>;<Pm>$y (ANSI) | xterm-ctlseqs (DECRPM, CSI ? Ps ; Pm $ y / CSI Ps ; Pm $ y) |
Vendor / terminal-specific extensions
Sequences whose canonical citation is outside ISO 6429 and xterm-ctlseqs: DEC's VT manuals (DECSC/DECRC, sixel via VT340), Kitty's graphics protocol, iTerm2 / Windows Terminal proprietary OSCs (OSC 7 CWD, OSC 9 notifications), the contour synchronized-update proposal (?2026), the gnome-terminal hyperlink proposal (OSC 8), and the ITU-T T.416 direct-color (truecolor) extension. Practical portability varies per row — some entries (truecolor, DECSC/DECRC) are now near-universal because xterm-ctlseqs lists them as secondary; others (Kitty graphics, sixel, OSC 9) remain confined to specific terminal families. Always consult the terminal support matrix per row.
| Sequence | Family | Bytes | Spec citation |
|---|---|---|---|
| SGR 48;2;R;G;B — 24-bit truecolor background | SGR | \x1b[48;2;R;G;Bm | ITU-T T.416 / xterm-ctlseqs (Direct color) |
| SGR 38;2;R;G;B — 24-bit truecolor foreground | SGR | \x1b[38;2;R;G;Bm | ITU-T T.416 / xterm-ctlseqs (Direct color) |
| DECSC / DECRC — Save and restore cursor | DEC | \x1b7 (save) \x1b8 (restore) | DEC STD 070 / xterm-ctlseqs |
| OSC 8 — Inline hyperlink | OSC | \x1b]8;;URI\x07TEXT\x1b]8;;\x07 | Hyperlinks in terminal emulators (gnome-terminal proposal, 2017) |
| OSC 9 — Toast notification (iTerm2 / Windows Terminal) | OSC | \x1b]9;MESSAGE\x07 | iTerm2 Proprietary Escape Codes (OSC 9) / Windows Terminal |
| DECSET ?2026 — Synchronized update mode | DEC | \x1b[?2026h (begin frame) \x1b[?2026l (end frame) | Synchronized Output Mode (contour spec) / Mode 2026 |
| DCS Sixel — Inline raster graphics (ESC P q … ESC \) | DCS | \x1bPq <sixel data> \x1b\\ | DEC VT340 Programmer Reference / xterm-ctlseqs (DCS Ps; Ps; Ps q) |
| OSC 7 — Current working directory hint | OSC | \x1b]7;file://HOST/PATH\x07 | iTerm2 Proprietary Escape Codes (OSC 7) / VTE / kitty |
| Kitty graphics protocol — Inline pixel images (ESC _ G … ESC \) | DCS | \x1b_Ga=T,f=100,m=1;BASE64_CHUNK\x1b\\ | Kitty Graphics Protocol (sw.kovidgoyal.net/kitty/graphics-protocol/) |
| DECUDK — Define User-Defined Keys (DCS Pc;Pl|Ky/St;... ST) | DCS | \x1bPPc;Pl|Ky/St;Ky/St;...\x1b\\ | DEC STD 070 (DECUDK) / xterm-ctlseqs |
| DECDLD — Dynamically Redefinable Character Set (DCS ... { ... ST) | DCS | \x1bPPfn;Pcn;Pe;Pcms;Pw;Pt{Dscs Sxbp1;Sxbp2;...\x1b\\ | DEC STD 070 (DECDLD) |
| DECSED / DECSEL — Selective erase display / line (CSI ? Ps J / CSI ? Ps K) | CSI | \x1b[?<Ps>J (DECSED) \x1b[?<Ps>K (DECSEL) | DEC STD 070 (DECSED / DECSEL) / DEC VT510 RM |
| DECSCA — Select character protection attribute (CSI Ps " q) | CSI | \x1b[<Ps>"q | DEC STD 070 (DECSCA) / DEC VT510 RM |
| DECSLRM — Set left and right margins (CSI Pl ; Pr s) | CSI | \x1b[<Pl>;<Pr>s | DEC STD 070 (DECSLRM) / DEC VT510 RM |
| DECDC / DECIC — Delete / insert column (CSI Pn ' ~ / CSI Pn ' }) | CSI | \x1b[<Pn>'~ (DECDC) \x1b[<Pn>'} (DECIC) | DEC VT520 RM (DECDC / DECIC) / xterm-ctlseqs |
| DECSWBV / DECSMBV — Set warning / margin bell volume (CSI Ps SP t / CSI Ps SP u) | CSI | \x1b[<Ps> t (DECSWBV) \x1b[<Ps> u (DECSMBV) | DEC VT520 RM (DECSWBV / DECSMBV) |
| CSI ? Ps n — Private DSR (extended status queries) | CSI | \x1b[?<Ps>n | DEC VT510 RM (private DSR) / xterm-ctlseqs |
| DECSASD / DECSSDT — Status display routing & type (CSI Ps $ } / CSI Ps $ ~) | CSI | \x1b[<Ps>$} (DECSASD) \x1b[<Ps>$~ (DECSSDT) | DEC VT520 RM (DECSASD / DECSSDT) |
| DECSDM — Sixel display mode (CSI ? 80 h / l) | DEC | \x1b[?80h (set) \x1b[?80l (reset) | DEC VT340 (Sixel) / xterm-ctlseqs |
| DECKPAM / DECKPNM — Keypad application / numeric mode (ESC = / ESC >) | ESC | \x1b= (DECKPAM) \x1b> (DECKPNM) | DEC VT100 (DECKPAM / DECKPNM) / xterm-ctlseqs |
| DECSCNM — Reverse video screen mode (CSI ? 5 h / l) | DEC | \x1b[?5h (reverse) \x1b[?5l (normal) | DEC VT100 (DECSCNM) / xterm-ctlseqs |
| DECSCLM — Smooth scrolling mode (CSI ? 4 h / l) | DEC | \x1b[?4h (smooth) \x1b[?4l (jump) | DEC VT100 (DECSCLM) / xterm-ctlseqs |
| DECARM — Auto-repeat keys mode (CSI ? 8 h / l) | DEC | \x1b[?8h (repeat) \x1b[?8l (no repeat) | DEC VT100 (DECARM) / xterm-ctlseqs |
| DECSCPP — Select columns per page (CSI Pn $ |) | CSI | \x1b[80$| (80 cols) \x1b[132$| (132 cols) | DEC VT400 (DECSCPP) / xterm-ctlseqs |
| DECCOLM — 80 / 132 column mode (CSI ? 3 h / l) | DEC | \x1b[?3h (132 cols) \x1b[?3l (80 cols) | DEC VT100 (DECCOLM) / xterm-ctlseqs |
| DECDHL / DECDWL / DECSWL — Double-height / double-width lines (ESC # 3 / # 4 / # 5 / # 6) | ESC | \x1b#3 (DHL top) \x1b#4 (DHL bottom) \x1b#5 (DECSWL) \x1b#6 (DECDWL) | DEC VT100 (DECDHL / DECDWL / DECSWL) / xterm-ctlseqs |
| DECALN — Screen alignment pattern (ESC # 8) | ESC | \x1b#8 | DEC VT100 (DECALN) / xterm-ctlseqs |
| SGR colon sub-parameters — ITU-T T.416 alternative (38:2:: / 48:2:: / 38:5:) | SGR | \x1b[38:2::255:128:64m (T.416) \x1b[38;2;255;128;64m (xterm-legacy) | ITU-T Rec. T.416 (ISO/IEC 8613-6) / xterm-ctlseqs (SGR Pm) |
| OSC 133 — Semantic prompt marks (FinalTerm A / B / C / D) | OSC | \x1b]133;A\x07 (prompt start) \x1b]133;B\x07 (command start) \x1b]133;C\x07 (output start) \x1b]133;D;<exit>\x07 (command end) | FinalTerm Semantic Prompts / xterm-ctlseqs (OSC 133) |
| OSC 1337 — iTerm2 inline images & file transfer | OSC | \x1b]1337;File=name=<base64>;size=<bytes>;inline=1:<base64-data>\x07 | iTerm2 Proprietary Escape Codes (OSC 1337) |
| OSC 9 ; 4 — ConEmu progress indicator (Windows Terminal / Ghostty) | OSC | \x1b]9;4;<state>;<percent>\x07 | ConEmu OSC 9;4 / Windows Terminal 1.18+ / Ghostty |
| DECRSPS — Restore Presentation State (DCS $ t ... ST) | DCS | \x1bP1$t<saved-state>\x1b\\ (cursor) \x1bP2$t<saved-state>\x1b\\ (tab stops) | DEC VT510 RM (DECRSPS) / xterm-ctlseqs |
| DECDMAC / DECINVM — Define & invoke macro (DCS Pn ; Pn ; Pn ! z ... ST / CSI Pn * z) | DCS | \x1bP<Pid>;<Pdt>;<Penc>!z<MACRO-BODY>\x1b\\ (define) \x1b[<Pid>*z (invoke) | DEC VT520 RM (DECDMAC / DECINVM) / xterm-ctlseqs |
| DECSCL — Select conformance level (`CSI Pl ; Pc " p`) | CSI | \x1b[<Pl>;<Pc>" p | DEC VT510 RM (DECSCL) / xterm-ctlseqs |
| DECSTR side-effects — exactly which modes `\x1b[!p` resets | CSI | \x1b[!p | DEC VT510 RM §8.4.1 (DECSTR side-effect table) / xterm-ctlseqs |
| DEC locator suite — DECELR / DECEFR / DECSLE / DECRQLP (mouse / locator events) | CSI | \x1b[<Pn>;<Pu>'z \x1b[<Pm>'{ \x1b[<Pt>;<Pl>;<Pb>;<Pr>'w \x1b[<Ps>'| | DEC VT510 RM (DECELR / DECEFR / DECSLE / DECRQLP / DECLRP) / xterm-ctlseqs |
| DECREQTPARM / DECREPTPARM — Request and report terminal parameters (`CSI Ps x`) | CSI | \x1b[<Ps>x | DEC VT100 User Guide §4 (DECREQTPARM / DECREPTPARM) / xterm-ctlseqs (CSI Ps x) |
| DECCARA / DECRARA — Change / Reverse attributes in rectangular area (`CSI Pt;Pl;Pb;Pr;Ps;… $ r` / `$ t`) | CSI | \x1b[<Pt>;<Pl>;<Pb>;<Pr>;<Ps>;…$r (DECCARA) \x1b[<Pt>;<Pl>;<Pb>;<Pr>;<Ps>;…$t (DECRARA) | DEC VT510 RM (DECCARA / DECRARA) / xterm-ctlseqs (CSI ... $ r / $ t) |
| DECNCSM — No Clear Screen on column-mode change (`CSI ? 95 h / l`) | DEC | \x1b[?95h (set — preserve) \x1b[?95l (reset — clear) | DEC VT510 RM (DECNCSM) / xterm-ctlseqs (CSI ? 95 h / l) |
| DECPS — Play Sound (`CSI Pv ; Pd ; Pn1 [; …] , ~`) | CSI | \x1b[<Pv>;<Pd>;<Pn1>[;<Pn2>…],~ | DEC VT520 RM Appendix A (DECPS) / xterm-ctlseqs (CSI Pv ; Pd ; Ps ; ... , ~) |
| Single Shift / Locking Shift family — SS2 / SS3 / LS2 / LS3 / LS1R / LS2R / LS3R | ESC | \x1bN SS2 \x1bO SS3 \x1bn LS2 \x1bo LS3 \x1b~ LS1R \x1b} LS2R \x1b| LS3R | ISO 2022 / ECMA-35 / xterm-ctlseqs (Single Shift + Locking Shift family) |
| DECTABSR — Tab Stop Report (`CSI 2 $ w`) | CSI | \x1b[2$w | DEC VT510 RM (DECTABSR / DECRPTAB) / xterm-ctlseqs (CSI 2 $ w) |
| DECRQUPSS / DECAUPSS — Request / Assign User-Preferred Supplemental Set | DCS | \x1b[&u request \x1bP<Ps>!u<D…D>\x1b\\ assign | DEC VT510 RM (DECRQUPSS / DECAUPSS) / ISO 2022 §6.4 (UPSS) / ECMA-35 §13.4 |
| DECRQCRA / DECCKSR — Request Checksum of Rectangular Area (`CSI Pi;Pg;Pt;Pl;Pb;Pr*y`) | CSI | \x1b[Pi;Pg;Pt;Pl;Pb;Pr*y reply \x1bP<Pi>!~<hex4>\x1b\\ | DEC VT510 RM (DECRQCRA / DECCKSR) / xterm-ctlseqs (CSI Pi;Pg;Pt;Pl;Pb;Pr * y) |
| DECRQTSR / DECRSTS — Request / Restore Terminal State Report | DCS | \x1b[Ps$u request \x1bP<Ps>$p<body>\x1b\\ restore | DEC VT510 RM (DECRQTSR / DECTSR / DECRSTS) / xterm-ctlseqs (CSI Ps $ u) |
| DECLL — Load LEDs (`CSI Ps q`, no SP intermediate) | CSI | \x1b[Ps q | DEC VT100 User Guide §5.4 (DECLL) / ECMA-48 §8.3.69 (LL — Load LEDs) |
| DECCRA / DECFRA / DECERA / DECSERA — Copy / Fill / Erase / Selective-erase rectangular area | CSI | \x1b[<Pts>;<Pls>;<Pbs>;<Prs>;<Pps>;<Ptd>;<Pld>;<Ppd>$v DECCRA\n\x1b[<Pch>;<Pt>;<Pl>;<Pb>;<Pr>$x DECFRA\n\x1b[<Pt>;<Pl>;<Pb>;<Pr>$z DECERA\n\x1b[<Pt>;<Pl>;<Pb>;<Pr>${ DECSERA | DEC VT510 RM (DECCRA / DECFRA / DECERA / DECSERA) / xterm-ctlseqs (CSI ... $ v / x / z / {) |
| DECSACE — Select Attribute Change Extent (`CSI Ps * x`) | CSI | \x1b[<Ps>*x | DEC VT510 RM (DECSACE) / xterm-ctlseqs (CSI Ps * x) |
| SGR 73 / 74 / 75 — Superscript / Subscript / Neither | SGR | \x1b[73m superscript \x1b[74m subscript \x1b[75m neither | mintty / Kitty terminal-graphics-protocol superscript-extension / xterm-ctlseqs patch #383 |
| DECRQDE / DECRPDE — Request / Report Displayed Extent (`CSI " v` / `" w`) | CSI | \x1b["v DECRQDE (request)\n\x1b[<Ph>;<Pw>;<Pml>;<Pmt>;<Pmp>"w DECRPDE (reply) | DEC VT420 / VT525 RM (DECRQDE / DECRPDE) / xterm-ctlseqs (CSI " v / " w) |