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

Key stroke listener, windows vs mac os #769

Closed
lcmgh opened this issue Mar 27, 2023 · 3 comments · Fixed by #775
Closed

Key stroke listener, windows vs mac os #769

lcmgh opened this issue Mar 27, 2023 · 3 comments · Fixed by #775

Comments

@lcmgh
Copy link

lcmgh commented Mar 27, 2023

Hi!

I am using this code taken from the tui crate examples https://github.com/fdehau/tui-rs/blob/master/examples/demo/crossterm.rs#L45 to listen for Key events. However the behavior on Mac OS vs. Windows is different. While on MacOS one can easily navigate Windows users report that when they type a key they move across two menu entries instead of one.

Do you have any idea why this is the case?

Thanks

@sigmaSd
Copy link
Contributor

sigmaSd commented Mar 27, 2023

#752

@lesleyrs
Copy link
Contributor

lesleyrs commented Apr 6, 2023

This one is more related to #772 (comment).

You need to check for KeyEventKind, either press or release. I think currently mac and linux only show presses right now?

@lcmgh
Copy link
Author

lcmgh commented Apr 6, 2023

My problem was solved by downgrading the version to 0.25.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

Successfully merging a pull request may close this issue.

3 participants