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

zellij injects additional keyboard input to textual-based TUIs #3959

Closed
isd-project opened this issue Jan 30, 2025 · 3 comments
Closed

zellij injects additional keyboard input to textual-based TUIs #3959

isd-project opened this issue Jan 30, 2025 · 3 comments

Comments

@isd-project
Copy link

isd-project commented Jan 30, 2025

2. Issues with the Zellij UI / behavior / crash

Issue description

Zellij seems to generate additional keyboard input when textual based TUI applications focus an input widget on startup. It seems like ansi escape codes aren't correctly escaped.

Image

Originally reported in: isd-project/isd#34

I am also posting this issue to the TUI framework, since I am not quite sure what the underlying issue is:

Minimal reproduction

Run uvx --python=3.12 --from git+https://github.com/isd-project/isd isd --cache_input=false to run a textual-based Python application. You will see that it auto-fills the input with [2026;2$y, which is not the case if the application is run without zellij.

Please let me know how I can help you to investigate this issue! 🙏

Thanks!

@isd-project
Copy link
Author

The textual author has determined that zellij is missing a ? in the generation of the escape code.

See Textualize/textual#5500 for details.

Ok, it looks like Zellij is generating an invalid sequence. I can see from the first line that it is missing a question mark. It should be sending "\x1b[?2026;2$y"

Suggest you report it upstream, looks like an easy fix. The spec is here:

https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036#feature-detection

@imsnif
Copy link
Member

imsnif commented Jan 31, 2025

Incidentally, the Textualize maintainers also kindly fixed this issue already: #3884

It should be released in the next version.

@isd-project
Copy link
Author

Ups, then I have re-discovered the bug a bit too fast. 😅
Thanks for the update!

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