Skip to main content

DA1

AI-Generated Content
This page was generated with the assistance of AI and may contain inaccuracies. It is intended as a placeholder for future human verification. If you spot issues ahead of its initial review, please report them on GitHub!
Standard

DA1 (Primary Device Attributes) is a CSI sequence that queries the terminal for its identity and supported features. The terminal responds with a list of attribute codes.

Syntax​

CSI c         DA1 request (query)
CSI ? Pp ; ... c DA1 response
Formal syntax
(* Request *)
DA1-request  = 0x1b, "[", [ "0" ], "c" ;

(* Response *)
DA1-response = 0x1b, "[", "?", Pp, { ";", Ps }, "c" ;
Pp = digit, { digit } ;                 (* terminal type *)
Ps = digit, { digit } ;                 (* feature code *)
digit = "0" | "1" | "2" | "3" | "4"
    | "5" | "6" | "7" | "8" | "9" ;

Description​

Per the VT510 manual, the host sends CSI c (or CSI 0 c) to request the terminal's primary device attributes. The terminal responds with CSI ? Pp ; Ps ; ... c where Pp identifies the terminal type and the Ps values indicate supported features.

Common response types​

The leading Pp value identifies the terminal class:

ValueTerminal type
1VT100
6VT102
62VT220
63VT320
64VT420
65VT510/VT520

Feature codes​

Common Ps feature attribute values include:

CodeFeature
1132 columns
4Sixel graphics
6Selective erase
9National Replacement Character sets
15Technical character set
22ANSI color (VT525)

Most modern terminal emulators respond as a VT220 (?62) or higher with various feature flags. The exact response varies by terminal and is a common method for feature detection.

Examples​

# Send DA1 query and read response
printf '\e[c'
# Typical XTerm response: ESC[?62;4;6;22c

Specifications​

SpecificationSection
VT510 Reference—

Terminal support​

TerminalSupportVersionNotes
Terminal Emulators
Alacritty✓YesReports VT102 (ESC [?6c)
Bobcat✓0.9.0Supported via TerminalCtrl library; device ID set as 'Bobcat <version>' (Terminal.cpp:35)
contour✓v0.1.0
foot✓YesImplemented at csi.c:822-875, reports as VT220 with sixel and color support
Ghostty✓v1.0.0
iTerm2✓YesPrimary device attributes (DA1) fully implemented with VT100CSI_DA token type. Reports various capabilities based on terminal type and emulation level.
Kitty✓YesResponds with callback to on_da1
Konsole✓YesReports VT220 with capabilities via CSI ? 62 ; 1 ; 4 c
mintty✓YesImplemented in write_primary_da() at src/termout.c:880. Reports different DA strings based on terminal type configuration (vt100-vt500).
mlterm✓YesSupported since early versions, customizable via primary_da config
PuTTY✓0.43Primary DA (CSI c) returns VT102 response at terminal.c:4509-4515
Rio✓v0.0.3Reports VT220 with ANSI color, VT320 rectangles, and user windows
rxvt-unicode✓1.2Reports VT100_ANS: ESC[?1;2c
st✓0.3Responds with VT102 identity (vtiden configurable)
terminology✓v0.4.0Reports VT510 with sixel, selective erase, color support
VT100✓Yes
VTE✓YesSupports VT520 level with 132-column mode, sixel graphics (conditional), horizontal scrolling, color text, and rectangular editing
WezTerm✓YesRequestPrimaryDeviceAttributes returns VT500 with capabilities
Windows Terminal✓YesReports conformance level 61 with extensions 4,6,7,14,21,22,23,24,28,32,42,52
xterm✓YesVT100 feature, supported since earliest versions
xterm.js✓2.3.0
Multiplexers
cy✓v0.1.0Responds with CSI ?6c
GNU Screen✓v.4.2.0CSI c reports VT100 with parameters 1;2 at src/ansi.c:1041-1043
tmux✓1.3Responds with VT220 attributes; Sixel support (4) included if compiled with ENABLE_SIXEL
tuios✓v0.0.15Reports VT220 with 132 columns, selective erase, national replacement charset, technical characters, windowing capability, and ANSI color
Zellij✓v0.12.0Reports VT220 with Sixel support (ESC[?62;4c)

See also​