Example of Keyboard Interaction in Blazor Diagram Component

Diagram / Interactive Features / Keyboard Interaction

This sample demonstrates keyboard interaction with the Diagram component through shortcut keys, managed by the command manager.

Loading Syncfusion Blazor Server Demos…

Built-In Commands

Command
Gesture
Select All Ctrl + A
Cut Ctrl + X
Copy Ctrl + C
Paste Ctrl + V
Undo Ctrl + Z
Redo Ctrl + Y
Delete Delete
Edit Annotation F2
Cancel Esc

Custom Commands

Command
Gesture
NodeGroup Ctrl + G
Ungroup Ctrl + U

Modified Commands

Command
Gesture
Navigate to Parent Node Up Arrow
Navigate to Child Node Down Arrow
Navigate to Previous Child Left Arrow
Navigate to Next Child Right Arrow

This example shows how to interact with the Diagram component using shortcut keys. The CommandManager property maps KeyboardCommands to key gestures. Alongside the built-in commands, several custom commands are added, and some default commands (e.g., nudge) are overridden. For instance, pressing the arrow keys moves the selection to the next node rather than shifting selected objects. The property panel lists various interactions and their associated key gestures.

Transform your Blazor web apps today with Syncfusion® Blazor components
100+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE