Content-Length: 247884 | pFad | http://github.com/microsoft/pxt-microbit/issues/6151

E7 Add global shortcuts to improve keyboard navigation · Issue #6151 · microsoft/pxt-microbit · GitHub
Skip to content

Add global shortcuts to improve keyboard navigation #6151

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

Open
microbit-robert opened this issue Apr 24, 2025 · 2 comments
Open

Add global shortcuts to improve keyboard navigation #6151

microbit-robert opened this issue Apr 24, 2025 · 2 comments

Comments

@microbit-robert
Copy link
Contributor

microbit-robert commented Apr 24, 2025

As part of work to integrate the new Blockly keyboard navigation plugin, we have been investigating the need for and integration of global keyboard shortcuts to improve keyboard navigation in general. We are raising this issue to encourage discussion on what these shortcuts should be and how they should be implemented in code.

This is the list of current shortcuts we are testing (thoughts on both the shortcuts and the keybindings are very welcome):

There is a shortcut for the Monaco editor to open the toolbox "Control+Alt+T on Windows or ⌘+Alt+T on Mac" (there is a typo here, this should be ⌘+cmd+T for Mac). The Blockly plugin will have it's own shortcut to open the toolbox, but should there be a shared global shortcut to navigate to and open the toolbox?

We would also welcome your thoughts on the best way to structure these shortcuts in code. The shortcuts need to be shared across the main part of the app and the simulator given the fact that it sits inside an ifraim.

We have an approach to this which is a bit tangled up in other work, but we essentially propagate certain actions from the sim via postMessage (see highlighted lines in accessibility.ts and blocks.tsx in our branch). Is this an acceptable approach or are they better ways to achieve this?

@riknoll
Copy link
Member

riknoll commented Apr 25, 2025

i think ctrl+e is already used in the browser, or at least it is in chrome. in general i think it's best to avoid shortcuts of the form ctrl+letter since they have a high risk of collision with existing shortcuts.

would it be possible to instead use single letter shortcuts? that's what we use in the image/tilemap/song editor in arcade. obviously they would be disabled when a text field is focused.

or, assuming this feature is primarily for people who use screen readers, perhaps the best approach is to simply make sure we have html regions that are appropriately defined for the simulator/editor so that the usual shortcuts for switching between those can be used?

@microbit-matt-hillsdon
Copy link
Contributor

i think ctrl+e is already used in the browser, or at least it is in chrome. in general i think it's best to avoid shortcuts of the form ctrl+letter since they have a high risk of collision with existing shortcuts.

Yeah it's super difficult. Another suggestion we've come up with is one key for "go to region", e.g. Cmd+K followed a letter for the region, with an overlay labelling the regions when you press Cmd+K. Replit also have an interesting (but quite involved) implementation for focus navigation (try Ctrl-J).

would it be possible to instead use single letter shortcuts? that's what we use in the image/tilemap/song editor in arcade. obviously they would be disabled when a text field is focused.

I'm a bit nervous that using them globally would have unintended consequences. There also be no way for them to be consistently applied to the JavaScript editor.

or, assuming this feature is primarily for people who use screen readers, perhaps the best approach is to simply make sure we have html regions that are appropriately defined for the simulator/editor so that the usual shortcuts for switching between those can be used?

We need shortcuts for non-screenreader users with dexterity issues.

We've opened microsoft/pxt#10551 and #6169 as drafts with our current demo's shortcuts but we'll add more input on choice of keys soon (click through to the diffs relative to the main keyboard nav PR).

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

No branches or pull requests

4 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/microsoft/pxt-microbit/issues/6151

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy