-
-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use sgr pixelmode mouse reporting where supported #2326
Comments
xterm will respond to DECRQM 1016 to let you know that SGR-Pixels will work, and is thus safe to switch to. |
sweet! |
Note that you can also get pixel mouse reporting with the DEC locator sequences ( |
@j4james , numerous comments of yours lead me to suspect that you have hidden away somewhere a great DEC-centric table of sequences and their support. hook a brother up? |
https://espterm.github.io/docs/Locator%20Input%20Model%20for%20ANSI%20Terminals%20(sixth%20revision).html seems to have good coverage of this. |
let's go ahead and look at knocking this out; i'm so so so so so sick of looking at debian autopkgtest failures |
here's what 1016 looks like on XTerm:
got some nasty crap from mlterm:
kitty with 1016 doesn't generate mouse events. wezterm looks like:
|
so xterm's responses are just a replacement of cells with pixels, though we do seem to report something a bit weird:
how did 141/474 become 138/471? |
margins, duh |
confirmed that XTerm and MLterm report 29 in DA1. so what's this weird form that MLTerm is returning to us? |
those are only coming in on clicks btw, not on mouse moves. doesn't look like we're getting anything for mouse moves in MLterm. |
hrmmm looks like we're never getting motion reports from mlterm, even with 1006 |
wezterm confirmed to provide motion reports under 1006 just fine |
so:
|
wait, xterm does not seem to advertise 29 in DA1, unlike mlterm and contour |
I will be fixing this. Sorry. |
Just to be clear, extension 29 indicates support for the DEC locator sequences - not XTerm's proprietary 1016 mouse mode. If you want to test for 1016 support you should probably use And if you're not getting a 29 report from XTerm, it's possible you don't have the locator support enabled. It needs to be be built with the
MLTerm does support move events via the |
yep, |
see @j4james 's comments above, @christianparpart. they don't map precisely. my error. |
using DECRQM 1016 ( mlterm: |
DECRPM 1016 comes back as 2 from XTerm and Wezterm. it does not come back from MLterm nor kitty nor contour. @klamonte is apparently changing the wezterm protocol up to match XTerm, at least on 1016. so this is exactly what we want. |
wait, wezterm seems to be working just fine? |
I just implemented this In Contour and merged to master. I simply didn't know about that feature. It would be nice if there is a notcurses mini paint demo program for spending this (using Sixel + SGR-pixels / DEC locator) :-) |
A mini paint application is precisely what I had in mind when I put in SGR-Pixels. 🙂 Actually what would be super handy for me is an image cropper: load image, drag rectangle over portion, crop it, save (as original format, not dithered). I am kinda tired of firing up gimp for something so small; being able to do it over ssh without X11 would be really nice. |
Generally speaking.... Plus a simple image browser and an ls that can preview (image) files in the listings. |
We currently use SGR-style mouse support, 1006 DECSET, but where supported we ought use 1016. this reports in pixels rather than cells. this ought only be used if we've verified pixel info support. so long as we have, set
y
/x
inncinput
by the reported y/cellpixy and x/cellpixx, and setypx
/xpx
to y%cellpixy and x%cellpixx.the only difficulty is knowing when 1016 is supported....
The text was updated successfully, but these errors were encountered: