Keyboard shortcuts
Every editor command with its default keys on Mac and on Windows and Linux, which you can change. In the editor, ? lists the shortcuts, and ⌘K / Ctrl+K runs any command by name, including the ones marked "Palette only". With view-only access, only the commands that don't change the diagram are available.
Edit#
| Command | Mac | Windows and Linux |
|---|
| Undo | ⌘Z | Ctrl+Z |
| Redo | ⇧⌘Z⌃Y | Ctrl+Shift+ZCtrl+Y |
| Delete selection | Del⌫ | DelBackspace |
| Copy | ⌘C | Ctrl+C |
| Paste | ⌘V | Ctrl+V |
| Insert shape | / | / |
| Insert image | Palette only | Palette only |
Selection#
| Command | Mac | Windows and Linux |
|---|
| Select all | ⌘A | Ctrl+A |
| Clear selection | Esc | Esc |
View#
| Command | Mac | Windows and Linux |
|---|
| Zoom in | += | += |
| Zoom out | − | − |
| Zoom to 100% | Palette only | Palette only |
| Fit to screen | Palette only | Palette only |
| Toggle shapes panel | Palette only | Palette only |
| Toggle code panel | Palette only | Palette only |
| Toggle history panel | Palette only | Palette only |
| Toggle pricing panel | Palette only | Palette only |
| Compare cost stages | Palette only | Palette only |
| Toggle presentation mode | ⌘\⌘. | Ctrl+\Ctrl+. |
Pages#
| Command | Mac | Windows and Linux |
|---|
| Edit cost stages | Palette only | Palette only |
| Previous page | [ | [ |
| Next page | ] | ] |
| New page | Palette only | Palette only |
| New page from Mermaid | Palette only | Palette only |
| Sync page with Git | Palette only | Palette only |
| Duplicate page | Palette only | Palette only |
Diagram#
| Command | Mac | Windows and Linux |
|---|
| Share diagram | Palette only | Palette only |
| Export page as JSON | Palette only | Palette only |
| Export as PNG | Palette only | Palette only |
| Export as JPG | Palette only | Palette only |
| Export as SVG | Palette only | Palette only |
Help#
| Command | Mac | Windows and Linux |
|---|
| Command palette | ⌘K | Ctrl+K |
| Keyboard shortcuts | ? | ? |
Mouse and modifier keys#
| Action | What it does |
|---|
| Click with Shift, ⌘ or Ctrl | Adds the item to the selection, or removes it. |
| Drag on empty canvas | Selects everything the box touches. |
| Right-drag | Pans the canvas. |
| Right-click | Opens the canvas menu. |
| Double-click on empty canvas | Adds a text box there. |
| Ctrl after you start dragging | Moves or resizes without snapping. |
| Wheel with ⌘ or Ctrl, or pinch | Zooms around the pointer. |
| Wheel with Shift | Pans sideways. |
| Wheel or two-finger scroll | Zooms or pans, depending on the navigation mode. |
Change shortcuts#
Keyboard shortcuts under Preferences lists every command with its current shortcuts. Changes are stored in this browser and reach editors that are already open in it. The shortcuts dialog, the command palette, the canvas menu and the status bar show your shortcuts, and this page shows the defaults.
| Control | What it does |
|---|
| + | Records a shortcut: press the keys, or Esc to cancel. A command can have up to 4. |
| × on a key | Removes that shortcut. A command without any still runs from the command palette. |
| Reset button | Puts back the command's default shortcuts. |
| Reset all | Puts back every default. |
| Rule | Why |
|---|
| A shortcut belongs to one command. | Pressing one that's taken names the command that has it. |
| ⌥ Option and Alt can't be used. | They type special characters on many keyboards. |
| Tab can't be a shortcut. | It moves between controls. |
| Enter, Space and the arrow keys need ⌘, ⌃ or Ctrl. | On their own they press buttons and move around the editor. |
| Copy and paste can't be changed. | They always use your system's shortcuts. |
The dashboard's search keeps ⌘K / Ctrl+K, whatever the editor's Command palette uses.