-
Notifications
You must be signed in to change notification settings - Fork 143
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
Confirm dialogue doesn't work with non latin alphabet characters #256
Comments
Yeah, I don't like this either. But most of the CLI tools are like this. Which is also possible, but I came to an alternative solution: So add here: https://github.com/console-rs/dialoguer/blob/master/src/prompts/confirm.rs#L181-L205 Key::Char(c) if !c.is_ascii() => { offer_10(); } |
Alternative keys 1 and 0 would work on any keyboard layout. I don't have any other ideas on how to make confirm dialog work on non-latin keyboards 😔 |
That makes sense, I missed the "keyboard" in the issue description. |
I'm using Linux, Pop OS. If I change the keyboard layout to Russian, Ukrainian or Japanese, the confirm dialogue doesn't work.
This can be fixed by checking for a physical key, rather than a literal character. But as far as I've researched this is not a trivial thing to do. I'm not sure how to approach this issue with all the different languages and layouts in mind.
There is also a band aid solution. Just check against multiple characters from different languages.
The text was updated successfully, but these errors were encountered: