This is a tracking bug for design work to move Mover and the associated MoveActions from this repository to core.
Background: moving blocks with the keyboard
One of our goals for adding keyboard accessibility to Blockly is to provide parity between keyboard-driven and mouse-driven interactions, and so earlier in 2025 we added code to the @blockly/keyboard-navigation plugin package (which now lives in this repository) to allow users to move blocks (and workspace comments) using only the keyboard, without needing to use a pointer device.
The resulting code, in src/actions/move.ts, src/actions/mover.ts, and src/block_drag_strategy.ts, was initially written as a proof-of-concept and, although it has subsequently been polished in to a quite usable implementation, its origins as a quick hack are still much in evidence: the simplest way to make sure keyboard users could do everything a mouse user could do was to (ab)use the existing dragger (and therefore draggable) implementations, even though the former was never intended to be used this way, and doing so entailed Mover generating fake PointerEvents to pass to Dragger even though no pointer activity is actually occurring—not to mention illegally accessing private fields on various core classes for good bad measure.
Moving Mover to core
As part of our efforts to make accessibility a first-class feature of Blockly, we're planning to move support for moving workspace items using the keyboard from this plugin to the core Blockly repository. Unfortunately, for the reasons outlined above, the existing code is not suitable for inclusion in core as-is, so this issue tracks the task of planning what changes we might need to make both to core Blockly and to the plugin code in order to facilitate and then implement that move.
The custom dragging APIs
At the moment both Blockly's core (pointer) dragging support allow customisation through:
When these APIs were designed they were focused specifically on supporting moving items using a pointer (mouse, trackpad, or touch), but provision was made for using IDraggable and IDragStrategy for programmatic moves too by making the PointerEvent parameter to many of the methods in those APIs optional. (The same is not true for IDragger: its PointerEvent parameters are required, and hence the aforementioned shenanigans.)
A large part of the work involved in moving Mover to core is to figure out to what extent Mover can be modified to make (correct, as-intended) use of the existing custom dragging APIs, and to what extent those APIs will need to be modified/enhanced to support keyboard moves.
Tasks tracked in this issue (and sub-issues):
A rough outline of the work to be done:
This is a tracking bug for design work to move
Moverand the associatedMoveActionsfrom this repository to core.Background: moving blocks with the keyboard
One of our goals for adding keyboard accessibility to Blockly is to provide parity between keyboard-driven and mouse-driven interactions, and so earlier in 2025 we added code to the
@blockly/keyboard-navigationplugin package (which now lives in this repository) to allow users to move blocks (and workspace comments) using only the keyboard, without needing to use a pointer device.The resulting code, in
src/actions/move.ts,src/actions/mover.ts, andsrc/block_drag_strategy.ts, was initially written as a proof-of-concept and, although it has subsequently been polished in to a quite usable implementation, its origins as a quick hack are still much in evidence: the simplest way to make sure keyboard users could do everything a mouse user could do was to (ab)use the existing dragger (and therefore draggable) implementations, even though the former was never intended to be used this way, and doing so entailedMovergenerating fakePointerEventsto pass toDraggereven though no pointer activity is actually occurring—not to mention illegally accessingprivatefields on various core classes forgoodbad measure.Moving
Moverto coreAs part of our efforts to make accessibility a first-class feature of Blockly, we're planning to move support for moving workspace items using the keyboard from this plugin to the core Blockly repository. Unfortunately, for the reasons outlined above, the existing code is not suitable for inclusion in core as-is, so this issue tracks the task of planning what changes we might need to make both to core Blockly and to the plugin code in order to facilitate and then implement that move.
The custom dragging APIs
At the moment both Blockly's core (pointer) dragging support allow customisation through:
IDraggable,IDragStrategy, andIDragger.When these APIs were designed they were focused specifically on supporting moving items using a pointer (mouse, trackpad, or touch), but provision was made for using
IDraggableandIDragStrategyfor programmatic moves too by making thePointerEventparameter to many of the methods in those APIs optional. (The same is not true forIDragger: itsPointerEventparameters are required, and hence the aforementioned shenanigans.)A large part of the work involved in moving
Moverto core is to figure out to what extent Mover can be modified to make (correct, as-intended) use of the existing custom dragging APIs, and to what extent those APIs will need to be modified/enhanced to support keyboard moves.Tasks tracked in this issue (and sub-issues):
A rough outline of the work to be done:
IDraggable/IDragStrategyAPI #739Mover,KeyboardDragStrategybefore moving them, and create tracking bug(s).KeyboardDragStragegywith the existingBlockDragStrategy/BubbleDragStrategy/CommentDragStratey.KeyboardDragStrategymight become a mixin for or superclass of BlockDS / BubbleDS / CommentDS, to avoid the need to patch the drag strategy at move start time.IDragStrategyet al).BlockSvg.prototype.getDragTargetto not require aPointerEvent?KeyboardDragStrategy.Draggerto use new API.Moverfrom BKE.Moveaction from BKE.