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 on windows #775

Merged
merged 3 commits into from
Apr 7, 2023
Merged

Fix examples on windows #775

merged 3 commits into from
Apr 7, 2023

Conversation

lesleyrs
Copy link
Contributor

@lesleyrs lesleyrs commented Apr 5, 2023

Hey so the examples/demos have been broken since I found this crate, this stops "double presses" from happening by only looking for presses instead of all events. It seems to make demos work in conhost, windows terminal, and wezterm.

Edit: the "release" event does not seem to appear on cmd, so the problem might not be crossterm and I removed this hack.

Fixes #759, closes #772, closes #769

Related issue: #752

Also I had a problem where rust-analyzer didn't work in the interactive-demo sub-crate, it just shows a message "file not included in module tree". I had to move the folder out of crossterm and change the path to it in order to make it work. I already tried a bunch of stuff like changing where I open the folder in helix etc. Anyone else have this?

@lesleyrs
Copy link
Contributor Author

lesleyrs commented Apr 5, 2023

Some more notes: Wezterm eats key presses that are assigned to terminal shortcuts, but besides that it works perfectly along with conhost for KeyEventKind (press, release). While windows terminal shortcuts only apply while on the command line, yet it does not work correctly and keys that produce letters immediately send release.

Created an issue for this here: microsoft/terminal#15124

@lesleyrs lesleyrs changed the title temp? fix windows and examples Fix examples on windows Apr 6, 2023
@jasiukiewicztymon
Copy link

Great job, waiting for approvement! 🎉

@TimonPost TimonPost merged commit 923aaf5 into crossterm-rs:master Apr 7, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants