Source

Docs · Customise

Keyboard and commands

The command palette, default keys, and how to change any of them.

The palette

One palette with two modes, as in VS Code.

  • Cmd+P goes to a drawing. Recent ones come first.
  • Cmd+Shift+P (or Cmd+/) runs a command. The input starts with >; delete it to switch back to drawings.

Type a few letters in order, not necessarily next to each other: vdg finds vault-design. Enter runs and puts focus back on the canvas, Cmd+Enter runs and keeps the palette open, and Tab narrows to a family, so on “Theme: Dracula” it lists every Theme: ….

Commands mode has every Excalidraw editor action (tools, align, group, layers, lock, grid, zen mode, export) and every Vaultdraw feature as its own entry: Theme: <name>, Mode: Dark, Paper: Grid, Export: PDF, Settings: Hotkeys and so on. Entries that can’t run right now are hidden.

Default keys

Mod is Cmd on macOS and Ctrl on Windows and Linux.

KeyCommand
Mod+PGo to drawing
Mod+Shift+P, Mod+/Show all commands
Mod+NNew drawing
Mod+Alt+NNew from template
Mod+SSave drawing
Mod+Shift+FSearch vault
Mod+Shift+HHistory
Mod+Alt+GGraph view
Mod+Alt+LLocal graph
Mod+Alt+BBacklinks panel
Mod+Alt+KLink selection to drawing
Shift+Mod+EExport image
Mod+\Show or hide the navigator
Mod+,Settings
Mod+Shift+= / - / 0Interface zoom in, out, reset

Plain Mod + =, - and 0 zoom the canvas, as in Excalidraw.

Changing keys

Settings → Hotkeys lists every command with its keys. + records a new key, × removes one, ↺ resets the command. Keys that clash with another command or with an Excalidraw shortcut are shown in red with what they clash with; keys the system owns, such as Cmd+Q, are refused.

The same changes live in config.toml, as a list of keys per command id. Only your changes are stored:

[hotkeys]
"file.save" = ["Mod+S", "Alt+S"]   # add a key (list the default too)
"vault.newDrawing" = []            # unassign
"view.toggleNavigator" = ["Mod+B"] # change

A drawing can get its own key too: Assign hotkey to this drawing in the palette.

Key sequences, leader and which-key

A key can be a sequence of chords, like Vim’s gg or <leader> f f. Sequences are plain text in [hotkeys], so nothing is bound until you write one. With none set, Vaultdraw does no extra work per key and starts no timers.

[keys]
leader = "Backslash"             # what <leader> means (the default)

[keys.labels]
"<leader> f" = "file"            # a name for the group, shown in the popup

[hotkeys]
"list.first" = ["g g", "Home"]
"palette.files" = ["<leader> f f", "Mod+P"]
WrittenMeans
"g g"Press g, then g
<leader>The keys.leader key. Change it and every sequence follows.
<C-x>, <A-x>, <S-x>Ctrl+X, Alt+X, Shift+X (they combine: <C-S-x>)
<CR>, <Esc>, <Space>, <Tab>, <BS>, <Del>Enter, Escape, Space, Tab, Backspace, Delete

How it behaves:

  • Esc cancels a half-typed sequence. Backspace goes up one level.
  • A key that does not match cancels the sequence. On the canvas and in lists it is swallowed. In a text box it is typed, so you never lose a letter.
  • A sequence that starts with a plain key never starts in a text box. Use Mod, Ctrl or Alt there (Mod+Alt+K Mod+S).
  • If g and g g are both bound, g waits keys.timeout_ms, then runs. Press g again for the long one.
  • Letters follow your keyboard layout. Punctuation is the physical key, so on a non-US keyboard pick a leader that is easy to press, such as "Alt+K".

Which-key. After a short delay (keys.which_key_delay_ms, 400 ms) a popup lists the keys that can follow, with the command name or the group name. Up/Down and Enter pick an entry. It loads only the first time you use a sequence. Keys: show which-key shows it on demand, and Keys: cancel pending sequence cancels. Both are unbound by default.

In Settings. Hotkeys → Sequence records a sequence chord by chord (Enter saves, Backspace removes the last chord, Esc cancels). A key that starts another command’s sequence gets a prefix warning. Key group names on the same page edits [keys.labels]. The six [keys] options are in the config.toml reference.

Tool keys. R, E, A, Q and the other tool keys are now commands (tool.rectangle, tool.eraser, tool.arrow, tool.lock and so on), with the same default keys. Rebind them, remove them or make them sequences like any other command. They work while a drawing is open, not while you type or when a list, the gallery or the graph has focus.

File tree and list keys

The file tree, the Tags list, the Links panel and the Settings page list share one set of list.* commands. Their keys work only while that list has focus: click into it, or press Mod+Alt+F for the file tree. On the canvas r is still the rectangle tool, and in a text box j still types a j.

KeyAction
j / k, Down / UpMove down / up
g / Shift+G, Home / EndFirst / last row
l, RightOpen a folder, or step into an open one
h, LeftClose a folder, or go to its parent
Enter, oOpen a drawing or toggle a folder
Mod+EnterOpen in a new tab
r, F2Rename
d, DeleteMove to the Trash
a / Shift+ANew drawing / new folder
mMove to another folder
EscLeave the list and go back to the canvas

Each key is a command (list.down, list.collapse, list.delete and so on). They are in the palette, in Settings → Hotkeys, and in [hotkeys]:

[hotkeys]
"list.down" = ["ArrowDown", "Ctrl+N"]
"list.up" = ["ArrowUp", "Ctrl+P"]

Rename, delete, move and the row menu need a focused row. With none, they do nothing and the key passes on.

The keys of the gallery grid and the graph view are commands too, so you can rebind them like any other. They work only while that view has focus.

CommandsDefault keys
gallery.left, right, up, downh, l, k, j and the arrows
gallery.first, last, pageUp, pageDownHome, End, Page Up, Page Down
gallery.open, parent, closeEnter, Backspace, Esc
graph.moveLeft, moveRight, moveUp, moveDown, openNodeh, l, k, j and the arrows, Enter
graph.hints, focusFilter, toggleLocalf, /, Shift+L
graph.depth1, depth2, depth3, fit, zoomIn, zoomOut, close1, 2, 3, 0, =, -, Esc
[hotkeys]
"graph.close" = ["Escape", "Q"]

Tool defaults

Each tool can start with its own style. See Tool defaults.