wire / terminal-dec-private-mode / 1004
CSI ? 1004 h enables focus event reporting: the terminal sends CSI I when the window gains focus and CSI O when it loses focus. CSI ? 1004 l disables it. Apps use this to pause animations, refresh on focus, or change cursor styling.
aka: focus reporting · focus events · DECSET 1004 · ?1004h / ?1004l · CSI I · CSI O
DEC-private-mode introducer: \x1b[? ESC [ ? (0x1B 0x5B 0x3F)
terminator (none): ST · BEL
| id | name | bytes (ST) | meaning |
|---|---|---|---|
| set | Enable (DECSET) | \x1b[?1004h | CSI ? 1004 h enables focus reporting: on focus-in the terminal sends ESC [ I (CSI I) and on focus-out ESC [ O (CSI O). |
| reset | Disable (DECRST) | \x1b[?1004l | CSI ? 1004 l disables focus reporting; no focus events are sent. |
per-fact attribution:
agent: curl -H 'accept: application/json' wire.phall.io/terminal-dec-private-mode/1004
or /terminal-dec-private-mode/1004.json