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

fix(examples): update input in examples to only use press events #129

Merged
merged 4 commits into from
Apr 13, 2023
Merged

fix(examples): update input in examples to only use press events #129

merged 4 commits into from
Apr 13, 2023

Conversation

lesleyrs
Copy link
Contributor

@lesleyrs lesleyrs commented Apr 7, 2023

Hi I saw the user_input example was already updated to work on windows but I just did the rest of them that use input other than quit.

Also added a hack in panic.rs because on windows/powershell a release event is sent from when you originally press enter to cargo run. No more double presses now either.

Fix #120

Edit: I just looked at the conventional commit thing and it's just a fix, you can merge this now

@lesleyrs
Copy link
Contributor Author

lesleyrs commented Apr 8, 2023

Closing this because it's being reverted crossterm-rs/crossterm#778

@lesleyrs lesleyrs closed this Apr 8, 2023
@lesleyrs lesleyrs reopened this Apr 8, 2023
@mindoodoo
Copy link
Member

Any reason for the reopen ?

@lesleyrs
Copy link
Contributor Author

This can actually be merged, crossterm-rs/crossterm#778 (comment).

It's not 100% needed if crossterm puts release events behind a feature, but this will stop it from breaking whenever the feature is enabled on both windows and using kitty keyboard protocol on other platforms.

At this moment all the modified examples aren't compatible with release events, and without this PR they don't work as intended because of "double" events.

@lesleyrs lesleyrs changed the title Update input in examples for windows Update input in examples to only use press events Apr 12, 2023
examples/panic.rs Outdated Show resolved Hide resolved
@mindoodoo mindoodoo changed the title Update input in examples to only use press events fix(examples): update input in examples to only use press events Apr 12, 2023
@mindoodoo mindoodoo added the bug Something isn't working label Apr 12, 2023
Copy link
Member

@mindoodoo mindoodoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we don't know when they'll merge the PR putting this behind a feature in crossterm so makes sense to merge this for the time being !

@orhun orhun merged commit 4842885 into ratatui-org:main Apr 13, 2023
6 of 7 checks passed
@mindoodoo mindoodoo mentioned this pull request May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The table widget example is misguiding
3 participants