DECSASD / DECSSDT — Status display routing & type (CSI Ps $ } / CSI Ps $ ~)
Pick which display surface (main vs status line) receives subsequent output (DECSASD), and what the status line is for (DECSSDT) — DEC VT320's split-screen status row.
Byte forms
Every common string-literal form so you can paste-and-search either direction.
\x1b[<Ps>$} (DECSASD) \x1b[<Ps>$~ (DECSSDT)\033[1$} / \033[2$~\e[1$} / \e[2$~ESC [ Ps $ } / ESC [ Ps $ ~1b 5b ... 24 7d / 1b 5b ... 24 7eDescription
Two paired commands governing DEC VT320's 25th-row status line — a hardware-supported strip below the main 24-row display that holds OS status, hostname, or terminal-emulator chrome. DECSASD (\x1b[<Ps>$}) Select Active Status Display — pick which surface subsequent writes land on. Ps=0 selects the main display (default), Ps=1 selects the status line. After \x1b[1$}, cursor moves and writes target row 25 only; switch back with \x1b[0$} to resume normal output. DECSSDT (\x1b[<Ps>$~) Set Status Display Type — configures what the status line is for. Ps=0 no status line (row 25 returns to main display), Ps=1 indicator (terminal owns the row — shows online/offline, keyboard lock state), Ps=2 host-writable (application owns the row via DECSASD — the useful mode for vim-style ruler / curses status bars). Most modern emulators don't allocate a dedicated row — they treat row 25 as just another row of the main grid, making DECSASD a near-no-op (cursor jumps to row 25 but no virtual-screen split happens) and DECSSDT essentially ignored. The functional escape sequences are still recognized for VT compatibility but provide no semantic separation. Curses captures these as tsl (to status line) and fsl (from status line) entries in modern terminfo, mapping them to \x1b[1$} and \x1b[0$} respectively.
Spec citation: DEC VT520 RM (DECSASD / DECSSDT)
Parameters
| Ps (DECSASD) | Active display: 0 main, 1 status line. |
| Ps (DECSSDT) | Status display type: 0 none, 1 indicator (terminal-owned), 2 host-writable. |
Examples
# Reserve status line, write to it, return to main:\nprintf '\033[2$~' # DECSSDT: host-writable status\nprintf '\033[1$}' # DECSASD: target status\nprintf 'session: alice@host'\nprintf '\033[0$}' # DECSASD: back to mainimport sys\nsys.stdout.write('\x1b[2$~') # enable host-writable status linefmt.Print("\x1b[1$}") // following writes go to row 25\nfmt.Print("loading...")\nfmt.Print("\x1b[0$}") // back to mainprocess.stdout.write('\x1b[0$~') // disable status line (return row 25 to main)printf("\x1b[2$~\x1b[1$}"); /* enable status + select it */Terminal support
- xterm
- partial
- Linux console (fbcon)
- no
- macOS Terminal.app
- no
- iTerm2
- no
- Windows Terminal
- no
- cmd.exe / ConPTY
- no
- kitty
- no
- alacritty
- no
- WezTerm
- no
- Ghostty
- no
- GNOME Terminal
- no
- Konsole
- no
- tmux
- yes
- GNU screen
- yes
| xterm | Linux console (fbcon) | macOS Terminal.app | iTerm2 | Windows Terminal | cmd.exe / ConPTY | kitty | alacritty | WezTerm | Ghostty | GNOME Terminal | Konsole | tmux | GNU screen |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| partial | no | no | no | no | no | no | no | no | no | no | no | yes | yes |