Skip to content

Conversation

@tracygardner
Copy link
Contributor

Motivation

  • Improve keyboard navigation so pressing ArrowRight on a toolbox category always moves focus into the flyout when the flyout is open.
  • Make Enter/Space open and close collapsible toolbox categories instead of using lateral arrow keys for that action.

Description

  • Updated main/blocklyinit.js to add a wireToolboxKeyboardOverrides IIFE that installs a keydown listener on the toolbox DOM (toolbox.HtmlDiv or .blocklyToolboxDiv).
  • The listener ignores text inputs and content-editable elements and intercepts ArrowRight to focus the flyout workspace when flyout.isVisible() is true using Blockly.getFocusManager().focusTree(flyoutWorkspace).
  • The listener also maps Enter / Space / Spacebar to toggle expandable toolbox categories by calling selectedItem.toggleExpanded() when available.
  • Existing monkey-patch that no-ops toolbox.onKeyDown_ remains to defer core handling to the keyboard-navigation plugin.

Testing

  • No automated tests were run for this change.

Codex Task

@tracygardner tracygardner merged commit de26487 into main Jan 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants