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

How hotkeys are specified should be consistent: Use underscore _ #456

Closed
tig opened this issue May 20, 2020 · 2 comments
Closed

How hotkeys are specified should be consistent: Use underscore _ #456

tig opened this issue May 20, 2020 · 2 comments
Assignees
Labels
design Issues regarding Terminal.Gui design (bugs, guidelines, debates, etc...) enhancement

Comments

@tig
Copy link
Collaborator

tig commented May 20, 2020

  • Button uses the first uppercase character
  • MenuItem uses the underscore (_) character
  • CheckBox uses _
  • RadioGroup uses _
  • StatusBar uses parameter to StatusItem, and the Shortcut property (Key). (this is OK).

This should be made consistent.

In addition, they way Button works means there's no way to say "NO HOTKEY!" if you without doing all lower case, which is sub-optimal.

Proposal:

  • Change all controls to use the same logic MenuItem uses, which is to have the first instance of an underscore indicate the following char is the hotkey.
  • Ensure that a double underscore (__) means to treat the underscore as a literal.

See #455

@tig tig added enhancement design Issues regarding Terminal.Gui design (bugs, guidelines, debates, etc...) labels May 20, 2020
@tig tig mentioned this issue May 20, 2020
@tig
Copy link
Collaborator Author

tig commented Jun 1, 2020

PR #590 fixes this for Button

@tig
Copy link
Collaborator Author

tig commented Jun 3, 2020

This is now consistent across all controls (except StatusBar, but that's ok because it supports things like F1).

@tig tig closed this as completed Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Issues regarding Terminal.Gui design (bugs, guidelines, debates, etc...) enhancement
Projects
None yet
Development

No branches or pull requests

1 participant