Keyboard Shortcuts
⌘ is the Command key on macOS. On Windows, Linux and the web editor, read every ⌘ as Ctrl, so ⌘ + S is Ctrl + S. The app shows the right spelling for your system in its menus and tooltips.
Rows marked Desktop work in the desktop app only. Browsers reserve some of these keys for themselves, so the web editor cannot use them.
Global
| Shortcut | Action | Where |
|---|---|---|
| ⌘ + , | Open Settings | Both |
| ⌘ + S | Save file | Both |
| ⌘ + E | Share diagram (picture, live link, snapshot link) | Both |
| ⌘ + Shift + L | Copy snapshot link | Both |
| ⌘ + K | Find a diagram | Both |
| ⌘ + ? | Open this page | Both |
| ⌘ + Shift + R | Report a problem | Both |
| ⌘ + Q | Quit | Desktop |
In the web editor, Ctrl + Shift + R is normally the browser’s hard reload. Diagrammo takes the key instead, so use the browser’s reload button to force-refresh the page.
New and open
| Shortcut | Action | Where |
|---|---|---|
| ⌘ + N | New diagram | Desktop |
| ⌘ + Alt + N | New whiteboard | Desktop |
| ⌘ + Shift + V | New from clipboard (outside a text field) | Both |
| ⌘ + Shift + N | New window | Desktop |
| ⌘ + O | Open folder | Desktop |
| ⌘ + Shift + O | Open folder in a new window | Desktop |
With the file tree focused, ⌘ + N also starts a new file on the desktop. In the web editor that key is Alt + N (Option + N on a Mac), because the browser keeps ⌘ + N for a new window.
View and panels
| Shortcut | Action | Where |
|---|---|---|
| ⌘ + 1 | Show or hide the file tree | Desktop |
| ⌘ + 2 | Show or hide the code editor | Desktop |
| ⌘ + Shift + 1 | Show or hide the file tree | Both |
| ⌘ + Shift + 2 | Show or hide the code editor | Both |
| ⌘ + Shift + E | Switch the file tree between the open folder and Starred | Both |
| ⌘ + Arrow Left | Focus the previous panel | Both |
| ⌘ + Arrow Right | Focus the next panel | Both |
| ⌘ + Shift + F | Focus mode: hide the tree and editor, leave the preview | Both |
| ⌘ + = | Increase font size | Both |
| ⌘ + - | Decrease font size | Both |
| ⌘ + 0 | Reset font size | Both |
In the Starred view, ⌘ + 1 to ⌘ + 9 jump to the first nine starred diagrams instead of toggling panels (Desktop). ⌘ + Shift + 1 and ⌘ + Shift + 2 keep toggling the panels there.
File tree
Click the tree or move focus to it with ⌘ + Arrow Left.
| Shortcut | Action |
|---|---|
| j / Arrow Down | Move down |
| k / Arrow Up | Move up |
| l / Arrow Right | Expand folder |
| h / Arrow Left | Collapse folder |
| Enter / Space | Toggle a folder; Enter also opens a file |
| F2 | Rename |
| Delete | Delete |
| ⌘ + D | Duplicate file |
Editor
| Shortcut | Action |
|---|---|
| Tab / Shift + Tab | Indent / unindent |
| ⌘ + Z | Undo |
| ⌘ + Shift + Z / ⌘ + Y | Redo |
| ⌘ + Shift + . | In a Markdown file, edit the diagram fence under the cursor |
| Enter on a bare fence line | The same, when vim mode is off |
Vim mode is a switch in the Edit menu (desktop) and in Settings. With it on, the usual vim keys apply in the editor.
Preview
These work when the preview has focus. With the editor hidden, they step through the diagram’s elements.
| Shortcut | Action |
|---|---|
| j / Arrow Down / Space | Next element |
| k / Arrow Up / Shift + Space | Previous element |
Whiteboard
Select an element on the whiteboard first.
| Shortcut | Action |
|---|---|
| Arrow keys | Nudge the selection (hold Shift for ten times as far) |
| ] / [ | Bring to front / send to back |
| Alt + ] / Alt + [ | Move forward / back past the next overlapping shape |
| ⌘ + D | Duplicate |
| ⌘ + A | Select all |
| Delete / Backspace | Delete |
| Escape | Cancel the edit or clear the selection |
| ⌘ + Z, ⌘ + Shift + Z | Undo, redo |
| ⌘ + / | Show or hide the text view |
| ⌘ + 0, ⌘ + =, ⌘ + - | Fit to screen, zoom in, zoom out |
| ⌘ + Enter | Finish editing a text box |
Dialogs
| Shortcut | Action |
|---|---|
| Enter | Confirm |
| Escape | Cancel |