Skip to content
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

Support Pixel Coordinates in Mouse Events #873

Open
bbb651 opened this issue Mar 29, 2024 · 1 comment
Open

Support Pixel Coordinates in Mouse Events #873

bbb651 opened this issue Mar 29, 2024 · 1 comment

Comments

@bbb651
Copy link

bbb651 commented Mar 29, 2024

Is your feature request related to a problem? Please describe.
Some terminals offer the ability to report pixel coordinates of mouse events along with the character coordinate. I want to make a UI based on the kitty image protocol (also blocked by #834) where pixel coordinates of events are important.

Describe the solution you'd like
I would like crossterm to provide access to these modes and add the pixel coordinates to MouseEvent.

Describe alternatives you've considered if any

Additional context
I found this website describing the SGR-Pixels (1016) mode.

@bbb651
Copy link
Author

bbb651 commented Mar 29, 2024

I just realized Event::Resize is also missing pixel sizes (there's a variety of xterm sequences for that, also there's TIOCGWINSZ with the ioctl syscall and SIGWINCH signal on unix). Are these not implemented due platform support? Also is this library for/against implementing image protocols such as the kitty image protocol, iTerm image protocol, sixel, etc? (they are relatively niche in terms of usage and platform support, and are relatively complex and require a cargo feature to avoid image crate dependencies, but I feel like there's a gap in the rust ecosystem for high level terminal image handling).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant