Skip to content

Add global shortcuts to improve keyboard navigation #10551

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

Conversation

microbit-robert
Copy link
Contributor

@microbit-robert microbit-robert commented Apr 30, 2025

See microsoft/pxt-microbit#6151. We've moved to an approach where Ctrl-U shows an overlay with navigable regions labelled by number in an effort to move forward with this after some recent discussion.

See accompanying change in pxt-microbit which ensures that global shortcuts are also enabled when focus is inside the simulator iframe (e.g., simulator buttons, etc).

Link to demo. Please note that 'accessible blocks' need to be set to 'on' in the settings menu. Use Ctrl-U to show the navigation overlay, and then a number to move to that region. Ctrl-U is a shortcut to view the page source code which feels like a seldom used shortcut and one we can safely override.

Issues to fix:

  • Prevent the navigation overlay from running on the home page - it currently ends badly
  • Ctrl-U does not working the Monaco text editor due to existing editor shortcuts

@microbit-matt-hillsdon

@kmcnaught
Copy link

Should the navigation overlay work with the skip links at the start of the page or not?

I personally prefer what is currently implemented, i.e. region 1 starts with the editor toggle, not the skip links. I view the value of this global navigation to be quicker navigation throughout a coding session, and the skip links as mainly being valuable on first arrival. Most of the skip links are available within a couple of tabs anyway. The most valuable skip link for me is the "jump to Blocks workspace" when you have just arrived. If you've just triggered the global navigation overlay then you don't need it!

@microbit-robert microbit-robert marked this pull request as ready for review May 8, 2025 15:15
@microbit-robert microbit-robert marked this pull request as draft May 8, 2025 15:27
Adds Ctrl/Cmd+B shortcut that shows a numbered navigation overlay.
Integrates with a pxt-microbit change that propagates global-nav actions from
the simulator (otherwise they don't take effect when the iframe has focus).

Co-authored-by: Grace <145345672+microbit-grace@users.noreply.github.com>
@microbit-robert
Copy link
Contributor Author

Closing in favour of alternative PR.

@microbit-matt-hillsdon
Copy link
Contributor

Replaced by #10570

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.

3 participants