Skip to content

Keyboard help tweaks#11413

Open
microbit-matt-hillsdon wants to merge 4 commits into
microsoft:masterfrom
microbit-matt-hillsdon:keyboard-help-tweaks
Open

Keyboard help tweaks#11413
microbit-matt-hillsdon wants to merge 4 commits into
microsoft:masterfrom
microbit-matt-hillsdon:keyboard-help-tweaks

Conversation

@microbit-matt-hillsdon

Copy link
Copy Markdown
Contributor
  • Unify the Control modifier label on "Ctrl" (was a mix of "Ctrl" and "Control") with a "Control" aria-label so screen readers don't mangle "Ctrl" (which we've chosen for space).

  • Format the "Move anywhere" modifier as a key so it gets that label too.

  • Avoid showing the bare menu key for the context menu shortcut on Windows: prefer the first modifier-bearing shortcut (e.g. Ctrl+Enter) because not every keyboard has a menu key. The menu shortcut was new in v13.

- Unify the Control modifier label on "Ctrl" (was a mix of "Ctrl" and
  "Control") with a "Control" aria-label so screen readers don't mangle "Ctrl"
  (which we've chosen for space).

- Format the "Move anywhere" modifier as a key so it gets that label too.

- Avoid showing the bare menu key for the context menu shortcut on Windows:
  prefer the first modifier-bearing shortcut (e.g. Ctrl+Enter) because not
  every keyboard has a menu key. The menu shortcut was new in v13.
It is a workspace toggle, not a global control, so it belongs there.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refines how keyboard shortcuts are displayed in the keyboard controls help UI, with a focus on accessibility and platform consistency across the PXT webapp.

Changes:

  • Standardizes the Control modifier display to a compact Ctrl label (with a “Control” screen-reader label in the help UI).
  • Renders the “Move anywhere” modifier using the <Key> UI so it gets consistent key styling/ARIA labeling.
  • Adjusts shortcut selection logic to avoid showing a bare Menu key for the context menu shortcut on Windows when an alternative modified shortcut exists.
Show a summary per file
File Description
webapp/src/shortcut_formatting.ts Adds a shared Ctrl label constant and updates shortcut selection to prefer modifier-bearing variants over a bare Menu key.
webapp/src/components/KeyboardControlsHelp.tsx Reuses the shared Ctrl label, renders “Move anywhere” modifier as a <Key>, and updates context menu row labeling/ordering.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

Comment thread webapp/src/components/KeyboardControlsHelp.tsx
microbit-matt-hillsdon and others added 2 commits June 19, 2026 14:44
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

2 participants