Skip to content

Cursor position report (DSR 6)

Category: cursor · Baseline: modern · Tags: ECMA-48 Standard, VT100 · Specification ↗

ESC [ 6 n → ESC [ row ; col R
DSR 6 (Device Status Report) queries the current cursor position. The application sends ESC [ 6 n and the terminal responds with ESC [ row ; col R. This request-response mechanism is used by shell integration scripts, TUI frameworks, and applications that need to know where the cursor is before rendering content.
How this is testedautomated
Move cursor to row 3, col 5 via \x1b[3;5H, send DSR 6 (\x1b[6n), verify response contains 3;5R.

The same probe runs against headless backends (via Termless) and real terminal apps (via a daemon launched in each terminal). This lets us distinguish parser correctness from rendering correctness.

Analysis2026-04-06

Supported by all 12 tested terminals — universal adoption. Part of the Modern TUI baseline.

Supported by 9 of 14 backends (64%)

Terminal Applications

TerminalVersionSupportNotes
iTerm23.6.9✓ yes
Ghostty1.3.1✓ yes
VS Code✓ yes
Warp✓ yes
Cursor✓ yes
Terminal.app✓ yes

Headless Backends

Parser correctness only — a means the parser accepts the sequence.

BackendVersionSupportNotes
vt100.js0.2.1✓ yesNo output stream — pure TypeScript emulator
vterm0.2.0✓ yes
Alacritty0.26.0~ partialHeadless mode has no output stream for DSR responses
Kitty0.40.0~ partialHeadless mode has no output stream for DSR responses
WezTerm0.1.0-fork.5~ partialHeadless mode has no output stream for DSR responses
xterm.js5.5.0~ partialHeadless mode has no output stream for DSR responses