-
-
Notifications
You must be signed in to change notification settings - Fork 790
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 pointer icon is not changed to arrow when mouse is captured #859
Comments
A consequence of making this change would be that eg: vim with Do other terminal emulators change the mouse cursor to an arrow? |
FWIW, this is the patch to change to implement the behavior if you wanted to play around with it; as mentioned above, I don't think this should go in as-is. diff --git a/wezterm-gui/src/termwindow/mouseevent.rs b/wezterm-gui/src/termwindow/mouseevent.rs
index 345fc96a..4f3540b5 100644
--- a/wezterm-gui/src/termwindow/mouseevent.rs
+++ b/wezterm-gui/src/termwindow/mouseevent.rs
@@ -435,6 +435,8 @@ impl super::TermWindow {
// When hovering over a hyperlink, show an appropriate
// mouse cursor to give the cue that it is clickable
MouseCursor::Hand
+ } else if pane.is_mouse_grabbed() {
+ MouseCursor::Arrow
} else {
MouseCursor::Text
} |
Yes, a lot of major terminals do, including GNOME Terminal, alacritty, VS Code terminal, kitty, Konsole and many others. I think it's pretty standard behavior. |
I hope you don't mind me joining the discussion. From my perspective the arrow cursor is a better default than the text cursor. I've been using neovim with various terminal emulators and all of them used an arrow cursor for selecting text and honestly I haven't even noticed until now. Especially for yayagram but also for many other tui apps an arrow is essential for accurately clicking and selecting elements. The only use-case I see for the text cursor is for non-interactive elements. This would also help the user to distinguish applications that capture mouse input from applications that don't. Apart from that wezterm is exceptionally great! I really hope we can come up with a reasonable solution to fix this issue :) |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Is your feature request related to a problem? Please describe.
When mouse capturing is enabled (e.g. through
printf "\e[?1003h"
), the mouse pointer icon is not changed to an arrow and stays the beam icon. This is inappropriate for programs that let the user click on something.Describe the solution you'd like
The mouse pointer icon should be changed to an arrow.
I believe some calls to change the mouse icon should be inserted in places like here:
https://github.com/wez/wezterm/blob/main/term/src/terminalstate.rs#L2053
I tried to do this but couldn't quite figure out how to change the mouse icon from there.
Additional context
It feels pretty awkward to play yayagram like this
The text was updated successfully, but these errors were encountered: