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

Duplicated key input when running examples on Windows #132

Closed
fdncred opened this issue Apr 18, 2023 · 4 comments
Closed

Duplicated key input when running examples on Windows #132

fdncred opened this issue Apr 18, 2023 · 4 comments

Comments

@fdncred
Copy link

fdncred commented Apr 18, 2023

Describe the bug
I'm trying the examples and getting odd behavior that prevents the examples from working properly.

To Reproduce
Steps to reproduce the behavior:

  1. Below you can see how I compiled an ran.
  2. I did not hit any key after compilation and it automatically fills in "No" for the first answer.
  3. I try to type y on the next question and what prints to the screen is yy.
  4. Any example that requires typing input comes out as doubled for each key you type.
cargo r --example confirm
    Finished dev [unoptimized + debuginfo] target(s) in 0.18s
     Running `c:\cartar\debug\examples\confirm.exe`
> Do you live in Brazil? No
Your answer: false
? Do you want to move to another country? yy

Expected behavior
The keystrokes printed to the screen match what I type.

Desktop (please complete the following information):

  • OS: Windows 10
@mikaelmello
Copy link
Owner

Thanks for the report, I spun up a Windows VM and could reproduce the issue. I'll investigate ASAP

@mikaelmello
Copy link
Owner

I've identified the root cause which was upgrading crossterm to v0.26, and reverted the change.

Can you check if the problem is resolved on your end?

@mikaelmello mikaelmello changed the title Are examples working as expected? Duplicated key input when running examples on Windows Apr 19, 2023
@mikaelmello
Copy link
Owner

For tracking purposes, these are the related issues on crossterm:

crossterm-rs/crossterm#772
crossterm-rs/crossterm#752
crossterm-rs/crossterm#778

@fdncred
Copy link
Author

fdncred commented Apr 20, 2023

The revert fixed it for me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants