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

CTRL-C doesn't work anymore (Windows 11) #143

Closed
bjoernQ opened this issue Mar 14, 2022 · 6 comments · Fixed by #145
Closed

CTRL-C doesn't work anymore (Windows 11) #143

bjoernQ opened this issue Mar 14, 2022 · 6 comments · Fixed by #145
Assignees
Labels
bug Something isn't working upstream The issue lies with a dependency

Comments

@bjoernQ
Copy link
Contributor

bjoernQ commented Mar 14, 2022

On master ( 2e9347d34d41d9e59b62a2293bae41a7c193bb27 ) CTRL-C doesn't work anymore (Windows 11 at least) when running with --monitor

Need to check when exactly that broke - not tested on other platforms yet

@bjoernQ
Copy link
Contributor Author

bjoernQ commented Mar 14, 2022

Worked at least on commit eeb0e8f95d184209cc42be9c4fec15c7172729fc

@jessebraham
Copy link
Member

This line is the only real change I see to the monitor since the working commit hash you've posted. Sorry to be a bother, would you be able to confirm that this is the commit which caused the problem please?

@bjoernQ
Copy link
Contributor Author

bjoernQ commented Mar 14, 2022

Sorry I wanted to look into this already by myself but got distracted by some linker issues ....

However, I found something!

The root cause seems to be mentioned in crossterm-rs/crossterm#629

If I change

KeyCode::Char('c') => break,
to KeyCode::Char('C') => break, it works again - but certainly would break things on other platforms.

So, we could wait for the next crossterm release or add a temporary fix by adding the uppercase cases there, too. I personally can live with this since I use a locally compiled espflash where I can patch this but probably others will run into that issue in the meantime

I have no idea when to expect the next release of crossterm containing the fix. (I tried it with the main branch and then it works without changes on our side)

@jessebraham jessebraham added bug Something isn't working upstream The issue lies with a dependency labels Mar 14, 2022
@jessebraham
Copy link
Member

Changing:

KeyCode::Char('c') => break,
KeyCode::Char('r') => {

To:

KeyCode::Char('c') | KeyCode::Char('C') => break, 
KeyCode::Char('r') | KeyCode::Char('R') => { 

Should resolve this for the time being, no? I can say that on macOS Big Sur I do not experience this problem even without the fix, but it continues to work for me using this modification.

@bjoernQ
Copy link
Contributor Author

bjoernQ commented Mar 14, 2022

That should resolve it without breaking MacOS or Linux. And even when crossterm gets the fix it should still work.

@WindSoilder
Copy link

Hi, Sorry for introcing a bug like this in crossterm, for now the new version 0.23.1 is fixed.

@jessebraham jessebraham moved this to Todo in esp-rs Mar 25, 2022
@jessebraham jessebraham self-assigned this Mar 25, 2022
@jessebraham jessebraham moved this from Todo to Done in esp-rs Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream The issue lies with a dependency
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants