UNPKG

@blockly/keyboard-navigation

Version:
41 lines 1.23 kB
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { WorkspaceSvg } from 'blockly'; import { Navigation } from 'src/navigation'; /** * Logic for free movement of the cursor on the workspace with keyboard * shortcuts. */ export declare class WorkspaceMovement { private navigation; constructor(navigation: Navigation); private shortcuts; /** * Install the shortcuts. */ install(): void; /** * Uninstall the shortcuts. */ uninstall(): void; /** * Moves the workspace cursor in the given direction. * * @param workspace The workspace the cursor is on. * @param xDirection -1 to move cursor left. 1 to move cursor right. * @param yDirection -1 to move cursor up. 1 to move cursor down. * @returns True if the current node is a workspace, false * otherwise. */ moveWSCursor(workspace: WorkspaceSvg, xDirection: number, yDirection: number): boolean; /** * Moves the cursor to the workspace near the origin. * * @param workspace The workspace the cursor is on. */ createWSCursor(workspace: WorkspaceSvg): boolean; } //# sourceMappingURL=ws_movement.d.ts.map