Skip to content

Query Terminfo (XTGETTCAP) โ€‹

Category: device ยท Tags: Xterm Extensions ยท Specification โ†—

ESC P + q hex-name ESC \\
XTGETTCAP (DCS + q Pt ST) queries terminfo capabilities via DCS escape sequences. The terminal responds with the capability value, allowing applications to query terminal features without parsing terminfo databases. Used by notcurses and foot.
How this is tested: Send DCS + q 544e ST (hex-encoded query for TN capability), check for a DCS response.
Analysis2026-03-26

Supported by 2 of 8 terminals (25%). Part of the Rich TUI baseline. Notes: Kitty: Headless mode has no output stream for XTGETTCAP responses.

Supported by 3 of 13 backends (23%)

Terminal Applications โ€‹

TerminalVersionSupportNotes
iTerm23.6.9โœ“ yes
Ghostty1.3.1โœ“ yes
VS Code1.112.0โœ— noNo XTGETTCAP response
Warp0.2026.03.18.08.24.03โœ— noNo XTGETTCAP response
Cursor2.6.21โœ— noNo XTGETTCAP response
tmux3.6aโœ— notmux intercepts XTGETTCAP queries for its own terminfo, not the outer terminal's
Kitty0.46.2โœ— noHeadless mode has no output stream for XTGETTCAP responses
Terminal.app2.15โœ— noNo XTGETTCAP response
GNU Screen5.0.1โœ— noScreen does not support XTGETTCAP

Headless Backends โ€‹

Parser correctness only โ€” a โœ“ means the parser accepts the sequence.

BackendVersionSupportNotes
vterm0.2.0โœ“ yes
Alacritty0.26.0~ partialHeadless mode has no output stream for XTGETTCAP responses
WezTerm0.1.0-fork.5~ partialHeadless mode has no output stream for XTGETTCAP responses
vt1000.2.1โœ— noNo output stream โ€” pure TypeScript emulator

Powered by Termless
Playwright for Terminals