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

Mouse support via DEC Locator mode #186

Open
gwpl opened this issue Feb 14, 2025 · 6 comments
Open

Mouse support via DEC Locator mode #186

gwpl opened this issue Feb 14, 2025 · 6 comments

Comments

@gwpl
Copy link

gwpl commented Feb 14, 2025

I tried in ttyd on Linux running and mouse was not detected:

Drawing Example
This example suggests how to implement the interaction among SIXEL terminals and pointer devices.
https://github.com/saitoha/libsixel/tree/master/examples/drawing
drawing

Not sure if problem is in example or in xterm.js or ttyd, so making ticket on each repo and cross linking:

tsl0922/ttyd#1422
xtermjs/xterm.js#5310
#186
(I never know what's the right way of making issue that are across repositories 🙈 , if there is any "right way")

@gwpl
Copy link
Author

gwpl commented Feb 14, 2025

As I've read in updates in xtermjs/xterm.js#5310 (comment) and xtermjs/xterm.js#5311 (comment) ,

it look like your example is using some old mouse encoding and maybe new should be considered?

If I read responses correctly some examples could be:
X10, SGR and SGR-PIXEL

@j4james
Copy link

j4james commented Feb 15, 2025

@gwpl This repository isn't maintained any more, and that drawing app is just a demonstration, so it's highly unlikely anyone is going to want to update it to use a different mouse encoding. So if you want to try out that app, I'd recommend you look for a better terminal. If you're on Linux, I think xterm or mlterm should work. And if you're on Windows you could try mintty or rlogin. There are probably a few others that should also work.

@gwpl
Copy link
Author

gwpl commented Feb 15, 2025

Hello @j4james thank you for feedback!

Regarding terminal, I am exploring possibilities of building on a top of ttyd https://github.com/tsl0922/ttyd/ (that uses xterm.js), to provide users ability to interact with apps via web browser regadless of their platform and skill level ,
and I am exploring how to allow interaction via Mouse as well!

@j4james
Copy link

j4james commented Feb 15, 2025

@gwpl Sorry, I didn't follow all your links, and I mistakenly assumed that ttyd was just another terminal. If you specifically need that for web sharing, and xterm.js isn't interested in supporting the DEC locator mode, then I don't think you have a lot of options.

If you're really keen to get this particular demo to work, you could always try adding support for the sgr-pixel mode yourself. It's a fairly basic app, so it shouldn't be that difficult, but I don't know much about the sgr-pixel protocol, so it may be more complicated than I'm imagining.

@jerch
Copy link

jerch commented Feb 16, 2025

@gwpl Well the sgr-pixel stuff is quite easy to implement (imho much easier than the DEC locator protocol). Whether it is easy to update the demo here idk, but you are most likely on your own here, as this repo is pretty much abandoned...

@gwpl
Copy link
Author

gwpl commented Feb 16, 2025

Thank you for hints and pointers on potential direction!
Ideally I would love some widely used library like rust crossterm to work with xterm.js , so programs could be easily hosted e.g. with ttyd , and I am learning on those issues from all of you what could be best course of action and protocols selection! Thank you!

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

3 participants