Skip to content

Conversation

@microbit-matt-hillsdon
Copy link
Contributor

@microbit-matt-hillsdon microbit-matt-hillsdon commented Jul 11, 2025

Behaviour changes:

  • Sort modifiers so we don't say Shift+Cmd+Z for redo on Mac (this change didn't help, presumably because of normalization in the shortcut registry)
  • Ctrl+Y is the preferred redo shortcut on Windows and not all apps support the more cross-platform Ctrl+Shift+Z so more helpful to teach Ctrl+Y.
  • Add guard in case plugin shortcuts are unbound.

Implementation change:

  • Map to user-facing key names last to keep earlier modifier logic using the shortcut registry representation of the modifiers. This the same point we do translations of modifiers in the equivalent code in MakeCode. This made it obvious that "Alt" didn't identify a Mac shortcut so removed it from the platform check (no change in shortcut dialog).

This PR is equivalent to changes we've had in MakeCode for a while now.

Fixes #647

Demo: https://shortcut-formatting-tweaks.blockly-keyboard-experimentation.pages.dev/

Behaviour changes:
- Sort modifiers so we don't say Shift+Cmd+Z for redo on Mac
- Ctrl+Y is the preferred redo shortcut on Windows and not all apps support the
  more cross-platform Ctrl+Shift+Z

Implementation change:
- Map to user-facing key names last to keep earlier modifier logic using the
  shortcut registry representation of the modifiers. This the same point we do
  translations of modifiers in the equivalent code in MakeCode.

Fixes RaspberryPiFoundation#647
@microbit-matt-hillsdon microbit-matt-hillsdon requested a review from a team as a code owner July 11, 2025 13:55
@microbit-matt-hillsdon microbit-matt-hillsdon requested review from gonfunko and removed request for a team July 11, 2025 13:55
@microbit-matt-hillsdon
Copy link
Contributor Author

Just a reminder that you need to merge.

@gonfunko gonfunko merged commit 42aa296 into RaspberryPiFoundation:main Jul 30, 2025
8 checks passed
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.

Shortcut dialog does not reflect Redo keyboard shortcut (Ctrl+Y in Windows)

2 participants