-
-
Notifications
You must be signed in to change notification settings - Fork 644
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
Random text input from mouse actions #932
Comments
@tlinford - do these look like scroll instructions to you? |
@imsnif yep it sure looks like it - seems to be either mode 1006 or 1015 by looking at https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Extended-coordinates |
Thanks @tlinford ! @zareami10 - are you running with |
No, I have not changed any settings. And I think the Formula which I have used for installation doesn't have any customization either. Maybe I should mention that the issue also happens when I run Zellij on a Linux remote machine (with the host still being macOS). So playing around a bit, it seems that the issue is much easier to reproduce in WezTerm (you just need to use some touch-pad gestures and then any mouse event including movements gets written in the terminal), making me wonder whether it might be an issue related to that (although the problem seems to happen only when using Zellij). |
@tlinford - any ideas? (if you have time to take a look) |
@imsnif for now I tried reproducing on wezterm with a touchpad (on linux), but no luck. |
I've also so far been unable to reproduce the issue on Linux (as host). When I use the Another thing that I have noticed (not using the mentioned option) is that the "status bar"'s content keeps changing and there are lots of "Text copied to clipboard" messages when using gestures, before the trigger of inputs appearing. |
Does the ZSH history scrolling happen outside of Zellij too? |
@imsnif I'm a bit stumped to be honest - regarding the problem observed with mouse mode on, as far as I can tell those all look like mouse release events, except they are bypassing termion for some reason? |
@tlinford - could it be that we're somehow doing the wrong thing here before sending stuff to termion (here we essentially deal with bracketed paste and home/end keys in terminfo): https://github.com/zellij-org/zellij/blob/main/zellij-client/src/stdin_handler.rs#L63-L119 ? @zareami10 - if this doesn't happen in ZSH outside of Zellij, any chance you could check in version |
No, it seems to be limited to Zellij.
Unfortunately the issue also happens on 0.19.0. |
@zareami10 would you be comfortable building and running from a debug branch and provide us some logs to try and figure out what is going wrong? |
Holding Ctrl or Shift while using the mouse also leads to mouse escape sequences passed plaintext through to the program running in zellij, maybe this is related?
|
I have attached the zellij-log folder. Reproducing the bug running on WezTerm. |
@raphCode are you also seeing the problem on macOS? |
I can reproduce a similar behavior, but I thought that one was intentional, as it happens regardless of the OS and terminal, unlike this bug. |
I have only tested on linux.
I also thought that, but since that behavior disappears with
My line of thinking was: maybe somehow (OS accessibility features, hardware bug, etc) Ctrl or Shift "hangs" and zellij produces these mouse escape sequences |
Thanks to both of you! I'm now able at least to reproduce the text input appearing - the characters were not showing up with fish, but trying it out in bash they are printed out. |
Hi @zareami10, we would really like to get to the bottom of this problem, would you be patient and give us some more details? 🙂 With mouse mode enabled, when you say that the terminal scrolls randomly, what do you mean exactly? In the other situation, with mouse-mode turned off, is the scrolling through zsh history random, or does it simply do it on scroll up/down? |
Sure.
Once the bug is triggered, you actually can scroll if you are careful not to move the mouse pointer. But if the pointer moves slightly new inputs appear and you're returned to the bottom.
It is a normal scrolling behaviour going up/down depending on the scroll direction. It also has the "kinetic" effect enabled, if it makes any sense in such a situation. If it would help I could provide a recording too, so just let me know. |
thanks, that's very helpful - i think what you are seeing with mouse mode off is faux scrolling, I found out about it here: alacritty/alacritty#1194 |
@zareami10 i pushed a new commit on the branch you tested on, to workaround this problem and avoid spamming all the mouse events to the terminal. Could you test it out and let me know? |
With the new commit I am no longer able to reproduce the mouse event inputs. But one issue still remains; using swipe left/right (even slightly) with the touch-pad keeps copying the text to clipboard (which is reflected on the status bar). One detail I have noticed is that text keeps getting copied over and over even in a single swipe until you stop the "gesture". |
Got it, my guess is that happens because during the gesture some mouse release events are being sent, and we currently don't track what button was pressed. |
@zareami10 - if you would be so patient, when you get a chance there's another commit on the branch to try that should avoid the copying while swiping. |
Regarding the mouse issues, things are looking good so far! (One "blank" line is due to configuration of prompt, but the one with "%" seems to appear randomly. And for some reason this issue also doesn't happen on Alacritty) |
Do you get the extra line if you try running the latest commit in main? |
I was able to reproduce it once on main, so I guess it's not related to your branch. But it's quite hard to reproduce sometimes so I can't say if the issue is new or not... |
Alright, good to know - if you want feel free to open up a separate issue for that, and thanks for helping to solve this problem. |
I know this one was closed, but I still have this issue, so I wonder if I've misconfigured something or is it reproducible with my combination of tools/environment. Using Kitty 0.26.5 with Zellij 0.34.4 and zsh 5.8.1 under macOS 13.0.1 (M1). In pure ZSH terminal without a Zellij session there are no issues whatsoever, but when I scroll (using my laptop's trackpad) in Zellij's pane I always get these... |
@tlinford thanks for the prompt response! Yes, it seems to be exactly the case. Somehow I didn't find that one. Gonna track the progress there. Cheers! 🤝 |
I do have the same problem when I scroll using Kitty and Zellij, is there any workaround ? |
@jfboisvieux I ended up scrolling only vertically (with a mouse, with Homerow.app and with Karabiner shortcuts to control the mouse pointer, while still using Kitty. So far, so good. While the issue gets fixed. |
Good to know tks !___## Ipad emailJean-Francois Boisvieuxmobile : (33) 6 32 49 26 98email : ***@***.*** 28 Jan 2023, at 12:18, Serge Bedzhyk ***@***.***> wrote:
@jfboisvieux I ended up scrolling only vertically (with a mouse, with Homerow.app and with Karabiner shortcuts to control the mouse pointer, while still using Kitty. So far, so good. While the issue gets fixed.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Can someone please reopen this? This still happens sometimes on Feb 2024 version. It is break my SSH sessions as the server can't handle this influx of input. |
Basic information
zellij --version
: 0.21.0OS:
macOs MontereyThis issue starts (apparently) randomly, but once it starts I can not actually stop it , and scrolling/entering commands becomes impossible as more input gets written and terminal scrolls randomly. The issue happens with multiple terminal emulators including WezTerm and default mac terminal.
Unfortunately I can not yet exactly reproduce the issue (which might have something to do with mouse reporting getting enabled?), but please let me know if there is any further information I can provide.
The text was updated successfully, but these errors were encountered: