Appearance
Focus tracking (DECSET 1004)
ESC [ ? 1004 hDECSET 1004 enables focus in/out event reporting. The sequence is
ESC [ ? 1004 h. When the terminal window gains focus, it sends ESC [ I; when it loses focus, it sends ESC [ O. Applications use this to pause animations, dim the UI, or refresh data when the user returns to the window.How this is testedautomated
Send
Send
\x1b[?1004h (DECSET 1004), verify focusTracking mode is active.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 13 of 14 backends (93%)
Terminal Applications
| Terminal | Version | Support | Notes |
|---|---|---|---|
| iTerm2 | 3.6.9 | ✓ yes | DECRPM: mode reset |
| Ghostty | 1.3.1 | ✓ yes | DECRPM: mode reset |
| VS Code | ✓ yes | ||
| Warp | ✓ yes | ||
| Cursor | ✓ yes | ||
| Terminal.app | ✓ yes |