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

Sub menus auto expand on down arrow #1739

Closed
tznind opened this issue May 24, 2022 · 2 comments
Closed

Sub menus auto expand on down arrow #1739

tznind opened this issue May 24, 2022 · 2 comments
Labels

Comments

@tznind
Copy link
Collaborator

tznind commented May 24, 2022

Describe the bug

When pressing arrow key down in a menu, any sub menus automatically expand and draw focus from the main menu. The only way for the user to continue down the main list is to press then LEFT arrow to get back into the main tree.

This is not the way keyboard navigation works in most GUIs e.g. Visual Studio:

sub-menus
Comparing keyboard navigation of menus that have submenus in Visual Studio vs Terminal.Gui

To Reproduce
Steps to reproduce the behavior:

  1. Create menu with multiple submenus
  2. Press down arrow multiple times

Expected behavior
It should be possible to keep scrolling down a menu using only up/down. Submenus should only expand on pressing RIGHT arrow (when using keyboard only navigation).

@BDisp
Copy link
Collaborator

BDisp commented May 24, 2022

Through the mouse the sub menus are auto expanding. So, I understand that they must have different behaviors.
You have to be aware that currently if you press the right arrow key the next menu from the menu bar will be selected.
Therefore the solution is, if the current opened menu has no sub menu, pressing the right arrow key the next menu from the menu bar will be selected. Otherwise the sub menu of the current opened menu will be opened. The same logic have to be used for the current sub menu opened and so on.

@tznind
Copy link
Collaborator Author

tznind commented May 24, 2022

Therefore the solution is, if the current opened menu has no sub menu, pressing the right arrow key the next menu from the menu bar will be selected. Otherwise the sub menu of the current opened menu will be opened. The same logic have to be used for the current sub menu opened.

That sounds perfect 💯

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

No branches or pull requests

3 participants