microsoft / microsoft/terminal
Add SGR-Pixels (mouse mode 1016)
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
### Description of the new feature
Now that sixel is implemented, [SGR-Pixels](https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#:~:text=improvement%20over%201006.-,sgr-pixels%20(1016),-Use%20the%20same) mouse mode would be a nice feature to have. Also helps to implement features such as, e.g., [smooth scrolling](https://textual.textualize.io/blog/2025/02/16/smoother-scrolling-in-the-terminal-mdash-a-feature-decades-in-the-making/).
I've searched through issues and only found two references to this feature (below), so hopefully this isn't a duplicate:
https://github.com/microsoft/terminal/issues/448#issuecomment-1010263526 with response from @j4james :
> I wasn't considering 1016, but I do have a POC of the DEC locator mode. There's no point in doing either of them until we have sixel, though, because the pixel coordinates will need to be tightly coupled to the sixel resolution.
And listed as not supported here https://github.com/microsoft/terminal/issues/10531#issuecomment-872398721 from @DHowett
Would prefer 1016 over DEC Locator since it seems to be more widely used?
https://github.com/dankamongmen/notcurses/issues/2326
https://github.com/wezterm/wezterm/issues/1457
https://github.com/mahmoudimus/jexer/blob/16d27b6f4182e3c2cfecd7673934ebe09782861a/README.md?plain=1#L26C1-L26C70
https://github.com/Aetf/libtsm/pull/29
https://github.com/xtermjs/xterm.js/issues/4092
### Proposed technical implementation details
_No response_
Contributor guide
Research direction
Start by reviewing the existing sixel implementation and the linked SGR-Pixels references, since no source files or tests are identified in the issue. Done means supporting mouse mode 1016 with pixel-coordinate behavior that works with the terminal's sixel resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100