Skip to content

Add Ctrl+E shortcut to focus Blockly workspace#354

Merged
tracygardner merged 3 commits intomainfrom
codex/add-ctrl-+-e-shortcut-for-workspace-focus
Mar 8, 2026
Merged

Add Ctrl+E shortcut to focus Blockly workspace#354
tracygardner merged 3 commits intomainfrom
codex/add-ctrl-+-e-shortcut-for-workspace-focus

Conversation

@tracygardner
Copy link
Contributor

Motivation

  • Provide a keyboard shortcut (Ctrl/Cmd + E) to move focus back to the Blockly code workspace so users can quickly resume block editing and have Blockly restore any previously passive/secondary focus inside the workspace via Blockly's focus manager.

Description

  • Add a global shortcut handler for Ctrl+E in main/main.js which calls Blockly.getFocusManager()?.focusTree?.(workspace) to restore workspace focus and preserve keyboard-navigation state.
  • Update the keyboard shortcut help table in index.html to include a Ctrl + E row labeled Focus code workspace.
  • Add a keyboard_workspace_ui translation key to the locale files (locale/*.js) so the new help entry resolves through the existing data-i18n mechanism and falls back properly.

Testing

  • Ran npm run build; this run failed due to a pre-existing unrelated Blockly import issue ("DUMMY_INPUT" is not exported by node_modules/blockly/index.mjs).
  • Ran npx eslint main/main.js locale/*.js; linting failed due to existing project issues (duplicate locale keys and some existing main/main.js warnings/errors) unrelated to the new shortcut code.
  • Started the dev server and executed a Playwright script that loaded the app and captured a screenshot of the info panel showing the new Ctrl + E row, which completed successfully and confirms the UI update.

Codex Task

@tracygardner tracygardner merged commit e22f832 into main Mar 8, 2026
5 checks passed
@tracygardner tracygardner deleted the codex/add-ctrl-+-e-shortcut-for-workspace-focus branch March 8, 2026 15:04
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.

1 participant