Skip to main content

DA2

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

DA2 (Secondary Device Attributes) is a CSI sequence that queries the terminal for its type and firmware version.

Syntax​

CSI > c           DA2 request (query)
CSI > Pp ; Pv ; Pc c DA2 response
Formal syntax
(* Request *)
DA2-request  = 0x1b, "[", ">", [ "0" ], "c" ;

(* Response *)
DA2-response = 0x1b, "[", ">", Pp, ";", Pv, ";", Pc, "c" ;
Pp = digit, { digit } ;                 (* terminal type *)
Pv = digit, { digit } ;                 (* firmware version *)
Pc = digit, { digit } ;                 (* ROM cartridge / always 0 *)
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 secondary device attributes. The response contains three values:

  • Pp — Terminal type identifier
  • Pv — Firmware/software version number
  • Pc — ROM cartridge registration number (always 0 on modern terminals)

Common terminal type identifiers​

ValueTerminal
0VT100
1VT220
2VT240 / VT241
41XTerm (commonly used)
65VT510 / VT520

Modern terminal emulators report different values. For example, XTerm reports 41 for Pp and its patch level for Pv. Some terminals (e.g., iTerm2, kitty) use unique identifiers.

note

DA2 is commonly used for terminal identification in conjunction with DA1. However, relying on DA2 for feature detection is fragile since terminals may report any values they choose. The XTVERSION query or DECRQM are more reliable for specific feature detection.

Examples​

printf '\e[>c'
# Typical XTerm response: ESC[>41;351;0c

Specifications​

SpecificationSection
VT510 Reference—

Terminal support​

TerminalSupportVersionNotes
Terminal Emulators
Alacritty✓v0.6.0
Bobcat✓0.9.0Supported via TerminalCtrl library
contour✓v0.1.0
foot✓YesImplemented at csi.c:1627-1667, reports VT220 with version number
Ghostty✓v1.0.0
iTerm2✓YesSecondary device attributes (DA2) fully implemented with VT100CSI_DA2 token type. Reports terminal version via reportSecondaryDeviceAttribute method.
Kitty✓YesResponds with >1;PRIMARY_VERSION;SECONDARY_VERSION c
Konsole✓YesReports secondary attributes via CSI > 1 ; 115 ; 0 c
mintty✓YesImplemented at src/termout.c:3137-3143. Reports terminal ID 77 (mintty), decimal version, and Unicode version.
mlterm✓YesSupported since early versions, customizable via secondary_da config
PuTTY✓0.52Secondary DA (CSI > c) reports xterm version 136 at terminal.c:4387-4394
Rio✓v0.0.3
rxvt-unicode✓1.2Reports CSI > 85;95;0c where 85='U' for urxvt
st✗NoCSI > c not handled; only ? prefix supported in parser
terminology✓v0.4.0Reports as VT510 terminal (61)
VT100✗No
VTE✓YesReports as VT100-ish (level 1) or VT525 (level 5) depending on build configuration
WezTerm✓YesRequestSecondaryDeviceAttributes returns VT220 with version 277
Windows Terminal✓YesReports VT100 terminal type (0) with version 10 (1.0)
xterm✓YesVT220+ feature, extended to VT100 in xterm
xterm.js✓2.3.0
Multiplexers
cy✗No
GNU Screen✓v.4.2.0CSI > c reports terminal type 83 (ASCII 'S') at src/ansi.c:1194-1196
tmux✓1.3Responds with terminal type 84 (tmux)
tuios✓v0.0.15Reports VT220 version 1.0
Zellij✓v0.12.0Reports secondary device attributes with version number

See also​