Skip to content

feat: Add a keyboard shortcut for displaying the contextual menu#9602

Open
gonfunko wants to merge 5 commits intomainfrom
menu-shortcut
Open

feat: Add a keyboard shortcut for displaying the contextual menu#9602
gonfunko wants to merge 5 commits intomainfrom
menu-shortcut

Conversation

@gonfunko
Copy link
Contributor

The basics

The details

Resolves

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.

@gonfunko gonfunko requested a review from a team as a code owner February 25, 2026 21:08
@gonfunko gonfunko requested a review from BenHenning February 25, 2026 21:08
@github-actions github-actions bot added the PR: feature Adds a feature label Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: feature Adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add keyboard shortcut to open the context menu Allow accessing the underlying menu from ContextMenu

2 participants