Appearance
SGR mouse mode (DECSET 1006)
SGR mouse mode replaces the legacy X10 mouse encoding with a format that supports arbitrarily large coordinates. Enable with
ESC [ ? 1006 h (in addition to a tracking mode like ?1000 or ?1003). Mouse events are reported as ESC [ < button ; col ; row M for press and ESC [ < button ; col ; row m for release.
The SGR format solves critical limitations of legacy mouse reporting: coordinates are decimal (no 223-column limit), button press and release are distinguishable by the final character (M vs m), and the format is unambiguous (no byte-value collisions with control characters). All modern TUI frameworks use SGR mouse mode.Supported by 6 of 6 backends (100%)
Support Matrix
| Backend | Version | Support | Notes |
|---|---|---|---|
| Alacritty | 0.26.0 | ✓ yes | |
| Ghostty | 1.3.1 | ✓ yes | |
| Kitty | 0.40.0 | ✓ yes | |
| vt100 | 0.1.0 | ✓ yes | |
| WezTerm | 0.1.0-fork.5 | ✓ yes | |
| xterm.js | 5.5.0 | ✓ yes |