-
-
Notifications
You must be signed in to change notification settings - Fork 287
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
No mouse support on Windows #2676
Comments
I do not know if this can be fixed. The lack of mouse clicks was reported a few months ago by @daviewales. It was reported when The dev team does not use Windows so the recommendation for running Windows is to use visidata inside WSL. Fixes to support Windows without WSL are welcome. They're just difficult to test and maintain. If I had a Windows machine right now, I'd check whether Lines 205 to 207 in 72b003a
And if no mouse event is being generated, maybe try looking at Line 15 in 72b003a
|
Thanks @midichef. I did some testing and found a fix: Adding Line 17 in 72b003a
Result:
I found it by trial-and-error and honestly I have no idea what |
Some links about
This seems like a strange fix to me as well. Is it possible that there is a bug in windows-curses that this works around somehow? |
Wow, great investigation @mplattner! Some details of what happens in Visidata. Line 148 in 70699c1
That restoration happens several times per second because getkeystroke() is called often in mainloop.py .
So maybe the sequence of events in Windows is: And perhaps the Python implementations of I'm not sure how to check this guess. I can't find a detailed implementation of You could try checking whether the mousemask is being changed in the first call to
On my system, Ubuntu 24.04, the mousemask is not changed by |
I think you're on the money @midichef. Without @mplattner's
With
|
Great. Looks like we've got a fix! I don't think adding @mplattner Do you want to put together a PR? It's probably a good idea to add a comment after the line like |
I found more implementation details. They confirm the guesses above about how the mouse was being disabled.
I'll leave some links here, in case we ever need to investigate this further in the future: So now we know precisely why @mplattner's fix works. |
Thank you so much @midichef and @daviewales for your inputs! 👏 |
I run visidata v3.1.1 on Windows 10 with Windows Terminal 1.21.3231.0. (Python 3.8.5 and Python 3.13.1)
Mouse clicks are not registered in the application. They are on Linux. It also works when I use
ssh
to connect to a Linux server that runs visidata v3.1.1 - so it shouldn't be the terminal's fault (I think).Is there a way to fix this?
The text was updated successfully, but these errors were encountered: