wire / terminal-dec-private-mode / 1000
CSI ? 1000 h enables 'normal' mouse tracking: the terminal reports mouse button press and release as CSI M Cb Cx Cy, where each coordinate byte is (value + 32). CSI ? 1000 l disables it. This is the baseline X11 mouse protocol; higher modes (1002 button-motion, 1003 any-motion) and encodings (1006 SGR) build on it.
aka: mouse tracking · X11 mouse · normal mouse mode · DECSET 1000 · ?1000h / ?1000l · button-event tracking
DEC-private-mode introducer: \x1b[? ESC [ ? (0x1B 0x5B 0x3F)
terminator (none): ST · BEL
| id | name | bytes (ST) | meaning |
|---|---|---|---|
| set | Enable (DECSET) | \x1b[?1000h | CSI ? 1000 h turns on normal (button press/release) mouse tracking. The terminal then reports clicks; with the default encoding the report is CSI M Cb Cx Cy where Cb encodes the button+modifiers and Cx,Cy are column,row, each as a single byte = (value + 32). |
| reset | Disable (DECRST) | \x1b[?1000l | CSI ? 1000 l turns off mouse tracking. |
| report | Default report format (terminal -> app) | \x1b[M | Under mode 1000 with the legacy encoding, a button event is reported as CSI M followed by three bytes: Cb (button + modifier bits, +32), Cx (column, +32), Cy (row, +32). Example: button 1 press at column 1, row 1 = ESC [ M space space space (0x20 0x20 0x20). |
per-fact attribution:
agent: curl -H 'accept: application/json' wire.phall.io/terminal-dec-private-mode/1000
or /terminal-dec-private-mode/1000.json