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

Unsupported input escape sequences reported as keypresses #834

Open
Timmmm opened this issue Oct 25, 2023 · 0 comments
Open

Unsupported input escape sequences reported as keypresses #834

Timmmm opened this issue Oct 25, 2023 · 0 comments

Comments

@Timmmm
Copy link

Timmmm commented Oct 25, 2023

If you use a feature that crossterm doesn't support directly, for example Kitty's graphics protocol, then the terminal will send escape sequences that crossterm doesn't understand.

In that case I would expect enum Event to have a UnrecognisedEscapeSequence(String) variant. However instead it seems to just report all of the characters in the escape sequence as Event::Key.

To reproduce, modify the event-read.rs example to send an image using the Kitty graphics protocol. You'll end up with something like this:

image

Note all the KeyEvents are really the terminal's confirmation that the image has been shown.

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

1 participant