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

Add '1' and '0' as allowed keys for Confirm #279

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Gordon01
Copy link
Contributor

Fixes: #256

In an effort to foster a more inclusive and accessible user interface, this PR introduces '1' and '0' as alternative input options alongside 'y' and 'n' in the text confirmation prompt.

&self.prompt_suffix,
self.defaults_style.apply_to("yes")
),
Some(false) => write!(
f,
"{} {} {}",
self.hint_style.apply_to("(y/n)"),
self.hint_style.apply_to("(y/n or 1/0)"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we not have the hints in prompts and leave them as y/n?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't want to change the hint, I can make a logic to change it to 1/0 when the non-ascii character is read.
Otherwise, users will probably find it hard to discover alternative keys.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue with showing things after a key is pressed is that in some scenarios, the prompt is considered answered as soon as a key is pressed. So, I am wondering if it's worth showing it at all.

Maybe for those scenarios where it waits, we can change it to show 1/0 only if one of them is pressed?

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 this pull request may close these issues.

Confirm dialogue doesn't work with non latin alphabet characters
2 participants