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

Keyboard Navigation #3193

Open
wants to merge 39 commits into
base: master
Choose a base branch
from

Conversation

Venkata-Sai-Vishwanath-robo
Copy link
Contributor

@Venkata-Sai-Vishwanath-robo Venkata-Sai-Vishwanath-robo commented Jul 7, 2024

This PR improves the keyboard accessibility of the App Inventor by introducing the following features:

  • Navigation in the project explorer: this enables the user to open projects, expand or collapse folders, and sort projects by name or date, using the keyboard.
  • Navigation in dropdown menus: this allows the user to open and close the dropdown with the help of the enter key and navigate the dropdown items using the arrow keys.
  • Navigation in Dialog boxes: this allows the user to cycle through the widgets inside a dialog box without letting the focus escape out of the dialog.
  • Component addition: this allows the user to add a component to the app's workspace from the component palette by pressing the enter key and also allows the user to add components into a specific arrangement they can by having the required arrangement selected in the Source Structure Explorer. The same function could also be done by double-clicking the palette item.
  • Accessing property editors with keyboard: this allows the user to open the popup attached to the property editor by pressing the enter key and the options in the popup are accessible with tab and arrow keys, upon closing the focus remains at the same spot.
  • The visibility of UI elements when they are focused has been enhanced.
  • Moving Components: this allows the user to move the selected component by pressing the alt + ↓/↑. This feature is not perfect and will require some changes.
  • Keyboard shortcuts have also been added which are listed below.

Keyboard Shortcuts

Action Key Combination
Focus component search box /
Focus Components tree T
Focus Hidden components checkbox V
Focus Properties Panel P
Switch between Designer and Block editor Ctrl + Alt
Rename Component Alt + N
Reset Connection Alt + Shift + R
Refresh Companion Screen Alt + R
Open/Close Backpack Alt + B
Switch between Inline and External Inputs Alt + I
Add comment to a block Alt + K
Expand/Collapse block Alt + O
Navigate up the blocks Alt + S
Navigate down the blocks Alt + W
Zoom in Alt + +
Zoom out Alt + -
Re-center Alt + G
Open Shortcuts Dialog Alt + ?

@AppInventorWorkerBee
Copy link
Collaborator

Can one of the admins verify this patch?

@Venkata-Sai-Vishwanath-robo Venkata-Sai-Vishwanath-robo marked this pull request as ready for review July 8, 2024 16:53
@SusanRatiLane SusanRatiLane self-assigned this Jul 9, 2024
@@ -655,15 +655,15 @@ public interface OdeMessages extends Messages, AutogeneratedOdeMessages {
@Description("Message providing details about starting a USB connection.")
String usbMenuItem();

@DefaultMessage("Reset Connection")
@DefaultMessage("Reset Connection (Alt + Shift + R)")
Copy link
Member

Choose a reason for hiding this comment

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

We may want to revisit this choice, since Alt on Windows typically maps to Cmd on macOS, and Cmd + R will refresh the page.

Copy link
Contributor

Choose a reason for hiding this comment

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

We may want to revisit this choice, since Alt on Windows typically maps to Cmd on macOS, and Cmd + R will refresh the page.

Does't Ctrl usually map to Cmd on MacOS in GUI aps? I usually expect Alt to map to Option.

I realize that we have a Ctrl button, and that works as Ctrl for a lot of command line stuff. There's no consistent official mapping.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback @ewpatton. I will look into these and fix them.
I will once go through the shortcuts in macOS and see for any more overlaps.
I still need to add code that adjusts the shortcut key messages based on whether the user is on Windows or macOS.
The community feedback is still pending, and I plan to complete it by the end of this week.

@SusanRatiLane
Copy link
Contributor

Issues from testing Sep 4, using Mac Firefox:

  1. I was unable to get the backpack to open using the shortcut.
  2. Highlighting of trees is not consistent in Neo. Often, only the bottom border of the tree is highlighted when the tree has focus

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

Successfully merging this pull request may close these issues.

4 participants