-
Notifications
You must be signed in to change notification settings - Fork 3k
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 interactions do not appear to be working properly on windows #1663
Comments
From @parthsdoshi Here's a test case that works using cmd.exe but not with alacritty.exe:
There's a few simpler test cases too. |
I've found that scrolling in Alacritty scrolls the whole alacritty buffer. So if I'm running tmux, the tmux panes themselves scroll off-view when I scroll in any pane.
If I launch wsl directly (Run > |
Yes, that's to be expected because the scroll event is not being sent to the application, only to the terminal's pager. |
Perhaps @zacps or a team member can update the original issue with a link to this, which I suppose can be considered the upstream issue: microsoft/terminal#376 @DHowett-MSFT has explained why this doesn't work (it's a ConPTY thing, nothing to do with alacritty one bit) |
This is happening to me with |
@kumarharsh that's because |
Yeah, I kinda realised that just after posting, so I deleted my comment to prevent confusion (sorry about that) |
I find mouse clicks to be accepted for WSL-tmux (on Windows) via wsltty. Source: microsoft/terminal#545 (comment) Are there special settings for |
No, the shell is likely just not sending/accepting the right escapes. |
To confirm, mouse is just not working yet in alacritty on windows? I can only select with it. |
Ehm, what else do you want from it? Are you talking about |
@kchibisov yes that's what I meant, sorry. |
Could you try running this P.s. I'm not sure whether windows has |
If Alacritty is using the windows pseudoconsole infrastructure (not wsltty(!)), you're still subject to the limitations mentioned in microsoft/terminal#545 (comment). The system-level support for translating mouse events isn't there just yet. 😄 |
I've just found out a link to a thread, thx @DHowett-MSFT . |
Latest version of MS terminal infrastructure has been updated to handle mouse events |
Just so you're aware: the console host changes here will be released in an upcoming version of Windows (probably not the most immediate one if the build number is <19500), and the changes we made do not support mouse events for Windows applications. For anyone working on a terminal: The pty hosting infrastructure now hooks the terminal's input stream directly to the application's input stream; there's no more input translation in the "pure VT" case. We still have a lot of work to do to synthesize windows mouse events for windows applications where we do need translation, but this may be enough to unblock other ConPTY consumers. |
So If I understand you correctly, if we have perfectly working mouse mode on all platforms except Windows(due to Windows), after this update things should work right away in ConPty for us? |
Yes, if the application on the other end is in VT input mode (so is running in WSL, newer versions of Cygwin/MSYS2, or otherwise using the |
Ok, thank you. |
Yeah I read a bit more on it and realised this. Oh well |
may help some people: |
Wezterm has also compiled the fixed version of conpty: https://github.com/wez/wezterm/tree/main/assets/windows/conhost |
It worked, thank you very much. I'm on windows 10 22h2. As I'm not willing to got to W11 just now, and Alacritty is actually faster then Wezterm (on my machine it seems that way) |
Yeah, performance on windows is bottle necked on ConPty. Even macOS alacritty is 10-100x faster than windows build, simply because conpty is too slow. |
I understand this issue is closed, but just for those who came looking like me, I have added a PR to update https://github.com/fredizzimo/alacritty/tree/add_openconsole_support to current master |
I can't believe these guys are abandoning Win10 users. I'm stuck on a Win10 corp laptop, like many of us are. Just wanted to tag the thread that as of 10/1/23, the above work-around still works. I used @anupamsr 's fork. Looks like it had too many conflicts to merge into @fredizzimo 's fork (but I'm not GitWizard). Thanks! |
@smprather it looks like you haven't looked into forks much or patches related. The required patches are merged and loading conpty.dll is supported on master. |
@kchibisov Yeh, I'm a Git dunce. There can be no doubt. So to be clear: What's the best route for me to take to get latest Alacritty w/ mouse working on Win10? |
build from master and add conpty.dll/OpenConsole.exe in the path. |
Ok, built from master. I had conpty.dll/OpenConsole.exe (that I got from WezTerm) in the same dir as the fresh alacritty.exe (C:\Program Files\Alacritty). Tried it, but I was getting a freeze-up after tmux attach. So I name-changed them "out of the way" (added _ to names), re-ran Alacritty, and now everything works perfect. Including an ssh from WSL to another machine running tmux. Thanks @kchibisov / @fredizzimo / @anupamsr ! (Note: I'm getting an occasional freeze-up. It's not a huge deal since I work via tmux, so I just close Alacritty and re-launch. I'm assuming it is unrelated and will be resolved eventually.) |
Nope. The freeze-up only takes a minute or two of working to kick in. Hopefully it is resolved soon. Looks like I'm back to KiTTY again :(. Maybe I'll give WezTerm a shot. |
just try older commits. |
Energy is running too low to throw darts in the dark. I may try again next weekend. Even though @fredizzimo 's fork is way out of date, it actually works pretty good (mouse works, no freezes... so far). I'll probably be missing some new things like undercurl, OSC-52, etc. But I can tough it out till master stabilizes. |
Use this one. I have been maintaining it for quite some time, though stopped around 4 months ago. I can update it if essential. https://github.com/anupamsr/alacritty/tree/add_openconsole_support |
I think I tried that one last night and it didn't work. I'll try again and let you know. Definitely not "essential". This whole quest started when I saw LazyVim mention "undercurl". I think that's pretty good evidence of low-prio 😄. |
I really don't understand this fuss with forks when the patch is upstream the way it was. it's all just dll loading in the end of the day, nothing special is required. Right here
It's likely just something got borked niside the upstream winit update. Just bisecting alacritty is more than enough to get this fixed, etc. Or maybe posting the |
And be aware that all features are basically tied to those |
I'm an electrical engineer, not a sw-dev. I can, and will, bisect to find the freeze-up commit. But I'm a git-dunce, so first, I'll have to figure out how to efficiently bisect. Then, each iteration is a 5 minute build followed by a few minutes of running to if freeze happens (I haven't identified the pattern yet). And these iterations must happen via awful Windows CLI environment. So that's another source of friction. I will get it done though. |
I came for the undercurl, but I'm staying for the speed. Even working via a horrible 150ms ping to my ssh servers in Sweden, the GUI speed-up vs. KiTTY is non-negligible when doing nvim scrolling, tmux window cycling, etc. |
There is one old patch that adds support for openconsole (https://github.com/fredizzimo/alacritty) which was working well but it wasn't updated. I updated it and submitted the patch (fredizzimo#1). Neither my patch nor the old patch were merged. Later it borked because of winit which I also fixed if I remember correctly. The reason I have not updated it in last 4 months is because there was a parallel commit done to the alacritty master achieving the same thing, which told me that noone has bothered to actually look at my repo that I had been maintaining. For those who still want to work on Windows 10 like I do, I suggest to just clone my repo. |
@anupamsr you're free to submit what you think is missing upstream, but the @fredizzimo patch was picked up and merged here #6994 . Windows support won't get better until folks can provide patches for it, because barely no alacritty contributors are developing on windows. |
I just spent a rather long time figuring out this issue. I have it solved now thanks to the tip to copy conpty and openconsole to alacritty. I'd recommend to bundle them with alacritty on Windows, as no doubt many other people will either never figure this out or waste their time. |
Hello @tfriedel, well i went all the way down to find your comment. can you briefly explain how you managed to make it work? thank you. |
@abdenourgnx
That's all! Alacritty will find these files and use them. (Unless you explicity disabled the conpty feature by setting winpty_backend to True) |
@tfriedel Like magic. Thank you for saving me from hours of pain. |
For Alacritty to support mouse pass through on Windows: alacritty/alacritty#1663 (comment)
@tfriedel Thanks mate!! work as treat!! |
Original issue by @dparnell
Which operating system does the issue occur on?
Windows 10 client connecting to a Linux 16.04 machine via ssh
Steps to reproduce:
dialog
is installeddialog --yesno Testing 10 30
Expected bahavior:
Clicking on either of the buttons should cause the
dialog
process to exitThe text was updated successfully, but these errors were encountered: