Skip to content

feat: Add optional shortcuts for scrolling workspace - #10293

Merged
mikeharv merged 1 commit into
RaspberryPiFoundation:mainfrom
mikeharv:scroll-shortcuts
Aug 19, 2026
Merged

feat: Add optional shortcuts for scrolling workspace#10293
mikeharv merged 1 commit into
RaspberryPiFoundation:mainfrom
mikeharv:scroll-shortcuts

Conversation

@mikeharv

Copy link
Copy Markdown
Contributor

The basics

The details

Resolves

Fixes #10182

Proposed Changes

Adds new optional shortcuts for scrolling the workspace. These shortcuts use the same default key bindings as unconstrained move mode (ctrl/cmd+arrow keys). They do not work on immovable workspaces (e.g. mutators), while editing fields, or while in the middle of a keyboard move. They do work in non-mutator flyout workspaces.
When a shortcut is used, the workspace will attempt to scroll by 50 screen pixels. If it fails to move, the user will beep and an announcement will be made using the Aria live region. The new shortcuts will be registered automatically by applications that call Blockly.ShortcutItems.registerNavigationShortcuts().

Reason for Changes

Currently, it is not possible to look around the workspace using the keyboard without changing focus.

Test Coverage

Existing teardown functions were updated if they also need to unregister these new shortcuts.

New tests cover:

  • Scrolling in each cardinal direction
  • Live region announcements
  • Failing to scroll past the edge of the workspace
  • Attempting to scroll while a block is in move mode

Documentation

This PR adds a row to the list of Optional navigation shortcuts.

@mikeharv
mikeharv requested a review from a team as a code owner August 19, 2026 17:59
@mikeharv
mikeharv requested a review from gonfunko August 19, 2026 17:59
@github-actions github-actions Bot added the PR: feature Adds a feature label Aug 19, 2026
@mikeharv
mikeharv merged commit e69b0df into RaspberryPiFoundation:main Aug 19, 2026
11 checks passed
@mikeharv
mikeharv deleted the scroll-shortcuts branch August 19, 2026 19:01
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.

Ability to scroll / pan workspace using keyboard

2 participants