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

In Kitty, cannot correctly deal with key pressing like Enter, Up-Arrow after disconnected from zellij in remote #3917

Open
smyle10 opened this issue Jan 6, 2025 · 3 comments

Comments

@smyle10
Copy link

smyle10 commented Jan 6, 2025

Basic information

zellij --version:
zellij 0.41.2 (in remote host)

stty size:

uname -av or ver(Windows):
Local: Linux mshigo 6.12.6-100.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 19 23:18:14 UTC 2024 x86_64 GNU/Linux
Remote: Linux mshi 5.3.11-100.fc29.x86_64 #1 SMP Tue Nov 12 20:41:25 UTC 2019 x86_64 GNU/Linux

Further information

Reproduction steps, noticeable behavior, related issues, etc

  1. Open kitty (0.38.0), use ssh to connect to the remote host
  2. After logged in, run zellij there to enter a zellij session
  3. Try pressing enter, then shift + ~ then . to quit ssh session, doesn't work (which works well in zellij 0.40.1)
  4. Cut off the connecting before local and remote, waiting for the local ssh session to automatically quit on timeout. Press enter key, it got :129u0 (in zellij 0.40.1 it will correctly start a new line)
    Screenshot from 2025-01-06 16-03-35

Other relevant information

I'm caring about this issue because I'm using a remote machine as a zellij proxy to do everything there. I frequently run in my laptop ssh -t $remote_host zellij attach a_zellij_session to enter an existing zellij session on the remote. As my laptop may sometimes disconnect from wifi, the ssh session is just hanging there. After I reconnected to a wifi, I often use enter then shift + ~ then . to force quit the hanging ssh session, and then press up to navigate to the last command ssh -t $remote_host zellij attach a_zellij_session to easily recovery my work.
This always worked in zellij 0.40.1, after I upgraded the zellij in remote to 0.41.2, it cannot correctly deal with enter, up key anymore and I have to create a new kitty tab to connect to the remote zellij, which is annoying.
Since my kitty version stays unchanged, so I'm thinking maybe something can be improved in zellij. (Though using the other terminals like terminator, alacritty etc still work with zellij 0.41.2)

@smyle10
Copy link
Author

smyle10 commented Jan 6, 2025

BTW I tried some upgrading/downgrading, the problem seems reproducible since version 0.41.0

@sstark
Copy link

sstark commented Jan 7, 2025

I can reproduce with both, kitty 0.37.0 and alacritty 0.13.2. Zellij version is 0.41.2 built from source. Client side is Mint 22, remote side is RHEL 9.

To reproduce I simply kill -9 the ssh session to the host running zellij (while zellij is attached) and my terminal becomes unusable in the way you describe. Also ctrl-d and mouse events stop working correctly and produce output similar to the above. The only way to recover is to restart the terminal emulator.

@smyle10
Copy link
Author

smyle10 commented Jan 13, 2025

I can reproduce with both, kitty 0.37.0 and alacritty 0.13.2. Zellij version is 0.41.2 built from source. Client side is Mint 22, remote side is RHEL 9.

To reproduce I simply kill -9 the ssh session to the host running zellij (while zellij is attached) and my terminal becomes unusable in the way you describe. Also ctrl-d and mouse events stop working correctly and produce output similar to the above. The only way to recover is to restart the terminal emulator.

Yes, me too. I forgot to mention that no matter kitty or alacritty always has the issue as you said ctrl-d, mouse events, ctrl-r etc, even in the earlier zellij version.
But in my use case, I just simply press up-arrow and enter to reconnect to the remote - this pattern worked until zellij 0.41.0

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

2 participants