wire / terminal-csi / dsr
DSR (final 'n') asks the terminal for status. CSI 5 n requests operating status; the terminal replies CSI 0 n ('OK'). CSI 6 n is the Cursor Position Report request (CPR); the terminal replies CSI Pl ; Pc R with the current row;column. The DEC-private form CSI ? 6 n (DECXCPR) additionally reports the page number.
aka: DSR · CPR · device status report · cursor position report · ESC [ 6 n
CSI introducer: \x1b[ ESC [ (0x1B 0x5B)
terminator (none): ST · BEL
| id | name | bytes (ST) | meaning |
|---|---|---|---|
| status | DSR 5 — operating status | \x1b[5n | CSI 5 n requests operating status; a healthy terminal replies CSI 0 n (no malfunction). |
| cpr | DSR 6 — Cursor Position Report (CPR) | \x1b[6n | CSI 6 n requests the cursor position; the terminal replies CSI Pl ; Pc R with the 1-based row and column. |
| decxcpr | DECXCPR — CSI ? 6 n | \x1b[?6n | CSI ? 6 n (DEC private) requests an extended CPR; the terminal replies CSI ? Pl ; Pc ; Pp R including the page number Pp. |
per-fact attribution:
agent: curl -H 'accept: application/json' wire.phall.io/terminal-csi/dsr
or /terminal-csi/dsr.json