DA — Device Attributes (CSI c / CSI > c)
Ask the terminal what kind of VT it is — primary (CSI c) returns features, secondary (CSI > c) returns model + firmware.
Byte forms
Every common string-literal form so you can paste-and-search either direction.
\x1b[c (primary DA) \x1b[>c (secondary DA)\033[c / \033[>c\e[c / \e[>cESC [ c / ESC [ > c1b 5b 63 / 1b 5b 3e 63Description
Device Attributes — a request/reply pair the application sends and the terminal answers via the input stream. **Primary DA** (`\x1b[c`, sometimes `\x1b[0c`) — terminal replies with `\x1b[?64;...c` listing the VT class and supported optional features (132-column mode, sixel, ReGIS, user-defined keys, etc.). **Secondary DA** (`\x1b[>c`, sometimes `\x1b[>0c`) — terminal replies with `\x1b[>Pp;Pv;Pcc` where Pp is the model (`0`=VT100, `1`=VT220, `41`=VT420, `61`=xterm-style, `65`=VT525, etc.), Pv is the firmware version, Pcc is the ROM cart serial (usually 0). Apps use DA on startup to feature-detect — neovim's `t_Co` autodetect, tmux's title-set capability probing, mintty's xterm-compat checks all rely on it.
Spec citation: ECMA-48 §8.3.24 (DA) / xterm-ctlseqs
Examples
# Send primary DA and read the reply (raw mode):\nstty -echo raw min 0 time 5\nprintf '\033[c'; IFS= read -r -t 1 -d c REPLY; stty sane\necho "DA reply: $REPLY c"import sys, termios, tty, select\nfd = sys.stdin.fileno(); old = termios.tcgetattr(fd); tty.setraw(fd)\ntry:\n sys.stdout.write('\x1b[c'); sys.stdout.flush()\n r, _, _ = select.select([fd], [], [], 1.0)\n print(repr(sys.stdin.read(64)) if r else 'no reply')\nfinally:\n termios.tcsetattr(fd, termios.TCSADRAIN, old)fmt.Print("\x1b[c") // request; read reply via os.Stdin in raw modeprocess.stdout.write('\x1b[c') // reply arrives on process.stdinprintf("\x1b[c"); fflush(stdout); /* read reply from stdin */Terminal support
- xterm
- yes
- Linux console (fbcon)
- yes
- macOS Terminal.app
- yes
- iTerm2
- yes
- Windows Terminal
- yes
- cmd.exe / ConPTY
- partial
- kitty
- yes
- alacritty
- yes
- WezTerm
- yes
- Ghostty
- yes
- GNOME Terminal
- yes
- Konsole
- yes
- tmux
- no
- GNU screen
- no
| xterm | Linux console (fbcon) | macOS Terminal.app | iTerm2 | Windows Terminal | cmd.exe / ConPTY | kitty | alacritty | WezTerm | Ghostty | GNOME Terminal | Konsole | tmux | GNU screen |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| yes | yes | yes | yes | yes | partial | yes | yes | yes | yes | yes | yes | no | no |