Shortcuts

This table lists end-user keyboard shortcuts that are available by default.

Keyboard Shortcut Command
ESC DiagramCommandsBase.CancelCommand
DELETE DiagramCommandsBase.DeleteCommand
CTRL+C DiagramCommandsBase.CopyCommand
CTRL+V DiagramCommandsBase.PasteCommand
CTRL+X DiagramCommandsBase.CutCommand
CTRL+A DiagramCommandsBase.SelectAllCommand
CTRL+N DiagramCommandsBase.NewFileCommand
CTRL+O DiagramCommandsBase.OpenFileCommand
CTRL+S DiagramCommandsBase.SaveFileCommand
CTRL+P DiagramCommandsBase.ShowPrintPreviewCommand
CTRL+1 DiagramCommandsBase.SelectToolCommand.WithParameter(CommandParameters.SelectTool_PointerTool)
CTRL+3 DiagramCommandsBase.SelectToolCommand.WithParameter(CommandParameters.SelectTool_ConnectorTool)
CTRL+8 DiagramCommandsBase.SelectToolCommand.WithParameter(CommandParameters.SelectTool_RectangleTool)
CTRL+9 DiagramCommandsBase.SelectToolCommand.WithParameter(CommandParameters.SelectTool_EllipseTool)
CTRL+SHIFT+T DiagramCommandsBase.SetVerticalAlignmentCommand.WithParameter(VerticalAlignment.Top)
CTRL+SHIFT+M DiagramCommandsBase.SetVerticalAlignmentCommand.WithParameter(VerticalAlignment.Center)
CTRL+SHIFT+V DiagramCommandsBase.SetVerticalAlignmentCommand.WithParameter(VerticalAlignment.Bottom)
CTRL+SHIFT+L DiagramCommandsBase.SetHorizontalAlignmentCommand.WithParameter(VerticalAlignment.Left)
CTRL+SHIFT+R DiagramCommandsBase.SetHorizontalAlignmentCommand.WithParameter(VerticalAlignment.Right)
CTRL+SHIFT+C DiagramCommandsBase.SetHorizontalAlignmentCommand.WithParameter(VerticalAlignment.Center)
CTRL+SHIFT+J DiagramCommandsBase.SetHorizontalAlignmentCommand.WithParameter(VerticalAlignment.Justify)
CTRL+SHIFT+S DiagramCommandsBase.SaveFileAsCommand
CTRL+Z DiagramCommandsBase.UndoCommand
CTRL+Y DiagramCommandsBase.RedoCommand
CTRL+SHIFT+Z DiagramCommandsBase.RedoCommand
F2 DiagramCommandsBase.EditCommand
CTRL+LEFT ARROW DiagramCommandsBase.MoveSelectionNoSnapCommand.WithParameter(Direction.Left)
LEFT ARROW DiagramCommandsBase.MoveSelectionCommand.WithParameter(Direction.Left)
CTRL+UP ARROW DiagramCommandsBase.MoveSelectionNoSnapCommand.WithParameter(Direction.Up)
UP ARROW DiagramCommandsBase.MoveSelectionCommand.WithParameter(Direction.Up)
CTRL+RIGHT ARROW DiagramCommandsBase.MoveSelectionNoSnapCommand.WithParameter(Direction.Right)
RIGHT ARROW DiagramCommandsBase.MoveSelectionCommand.WithParameter(Direction.Right)
CTRL+DOWN ARROW DiagramCommandsBase.MoveSelectionNoSnapCommand.WithParameter(Direction.Down)
DOWN ARROW DiagramCommandsBase.MoveSelectionCommand.WithParameter(Direction.Down)
CTRL+SHIFT+PERIOD DiagramCommandsBase.IncreaseFontSizeCommand
CTRL+SHIFT+COMMA DiagramCommandsBase.DecreaseFontSizeCommand
CTRL+B DiagramCommandsBase.ToggleFontBoldCommand
CTRL+U DiagramCommandsBase.ToggleFontUnderlineCommand
CTRL+I DiagramCommandsBase.ToggleFontItalicCommand
CTRL+SHIFT+F DiagramCommandsBase.BringToFrontCommand
CTRL+SHIFT+B DiagramCommandsBase.SendToBackCommand
CTRL+SHIFT+W DiagramCommandsBase.FitToPageCommand
CTRL+SHIFT+TAB DiagramCommandsBase.FocusPrevControlCommand
CTRL+TAB DiagramCommandsBase.FocusNextControlCommand
SHIFT+TAB DiagramCommandsBase.SelectPrevItemCommand
TAB DiagramCommandsBase.SelectNextItemCommand

Use the DiagramCommandsBase.RegisterHotKeys method to clear existing shortcuts or define new ones. The example below shows how set the F10 key as a shortcut that invokes the Print Preview and clear the shortcut associated with saving the diagram to a file.

diagram.Commands.RegisterHotKeys(x => {
                x.RegisterHotKey(Key.F10, ModifierKeys.None, DiagramCommandsBase.ShowPrintPreviewCommand);
                x.ClearHotKeys(DiagramCommandsBase.SaveFileCommand);
            });