feat: Add a keyboard shortcut for displaying the contextual menu by gonfunko · Pull Request #9602 · RaspberryPiFoundation/blockly
The basics
The details
Resolves
- Fixes Add keyboard shortcut to open the context menu #8847
- Fixes Allow accessing the underlying menu from ContextMenu #8786
Proposed Changes
This PR adds a keyboard shortcut (Ctrl/Cmd + Enter) for displaying the contextual menu for the currently focused item, assuming the currently focused item implements IContextMenu. It also addresses #8786 by adding a getter for the underlying Menu instance to Blockly.ContextMenu, which it uses to automatically highlight the first menu item in the contextual menu once it is displayed.
Tests were LLM-generated from a specified list of testcases and manually reviewed and modified.