Skip to content

Keyboard shortcuts ​

REPL ​

The REPL uses Emacs-style editing by default; set vi = true or press F4 for vi mode.

KeyDoes
EnterTake the highlighted suggestion if the completion menu is open. Otherwise run the buffer if the statement is finished (ends with ; or \G, or is a special command), or start a new line
Alt+EnterRun the buffer now, finished or not
TabTake the highlighted suggestion, or open the completion menu
Shift+TabPrevious suggestion
Ctrl+SpaceOpen the completion menu
↑ / ↓Move in the menu, or through lines and history
→Accept the grey suggestion from history
Ctrl+RSearch history
Ctrl+CCancel the running query (at the server), or clear the line
Ctrl+DQuit, on an empty line
Ctrl+LClear the screen
F2Toggle smart (context-aware) completion
F3Toggle multi-line mode
F4Toggle vi / Emacs editing

TUI ​

F1 shows these inside quarry (type to filter), and the command palette (Ctrl+P) lists every action by name.

These are the defaults. You can rebind the keys under Everywhere and Query tab, and most of the keys of the editor, the grids, the table view and the explorer: see Key bindings and vim mode for the action names.

Everywhere ​

KeyDoes
Ctrl+PCommand palette
F1, ?Shortcuts, filtered as you type (? doesn't work while typing in the editor)
Ctrl+OConnection manager
Ctrl+T / Ctrl+WNew query tab (from the explorer: for the selected database) / close tab
Alt+← / →, Ctrl+PgUp / PgDnPrevious / next tab
Alt+1…9Go to tab 1–9
F6 / Shift+F6Move focus: explorer → editor → results
Alt+0Focus the explorer
Ctrl+BShow or hide the explorer
Ctrl+GGo to a table (fuzzy search)
Ctrl+YTheme picker (outside the editor, where it's redo)
Ctrl+RHistory
Ctrl+QQuit

Query tab ​

KeyDoes
Ctrl+Enter, Ctrl+E, Alt+EnterRun the selection, or the statement under the cursor
F5, Ctrl+Shift+EnterRun everything in the editor
Esc, Ctrl+C (while running)Cancel the query
F7 / Shift+F7Explain / explain analyze
Alt+FFormat the SQL
Ctrl+SSave as a favourite
Ctrl+XExport results to a file (outside the editor, where it's cut)
Ctrl+↑ / ↓Resize the editor / results split

Editor ​

KeyDoes
Arrows, Shift+arrowsMove, select
Ctrl+← / →Move by word
Home / EndStart of text (then column 0) / end of line
Ctrl+Home / EndStart / end of the editor
Ctrl+SpaceCompletion (it also opens as you type)
Tab / Shift+TabIndent / unindent (the selected lines)
Ctrl+ASelect all
Ctrl+C / X / VCopy / cut / paste (system clipboard)
Ctrl+ZUndo
Ctrl+Y, Ctrl+Shift+ZRedo
Ctrl+DDuplicate the line or selection
Alt+↑ / ↓Move lines up / down
Ctrl+/Comment or uncomment
Ctrl+Backspace, Ctrl+DeleteDelete a word left / right
EscMove focus to the results

With vi = true the editor uses vim's modes and keys instead; see vim mode.

In the completion menu: ↓ / ↑ (or Ctrl+N / P) move, Tab or Enter accept, Esc closes.

Results and grids ​

KeyDoes
h j k l, arrowsMove (Shift extends the selection)
PgUp / PgDn, Ctrl+U / DPage / half page
g / GFirst / last row
0 / $, Home / EndFirst / last column
w / bA screen of columns right / left
Tab / Shift+TabNext / previous cell
v / VSelect a block / whole rows
EnterView the cell and its row (double-click works too)
y / YCopy cells as TSV / copy rows with a header
/, n, NSearch, next, previous
< / > / =Narrow / widen / auto-fit the column
[ / ]Previous / next result set
mMessages
iBack to the editor
Ctrl+XExport to a file

Table view ​

KeyDoes
fFilter with a WHERE condition
FFilter by the current cell's value
EscClear the filter
sSort by the column (ascending, descending, off)
e, F2Edit the cell (\N for NULL)
oAdd a row
D, DeleteMark rows for deletion
Ctrl+SReview and apply staged changes
uDiscard staged changes
r, F5Reload

Explorer ​

KeyDoes
j / k, arrowsMove
→ / l, ← / h, SpaceExpand, collapse, toggle
EnterOpen a table, show a function, insert a column name, or switch database
cNew query console for the database or schema you're in
sTable structure
iInsert the name into the editor
g + s / i / u / d / c / x / nWrite a SELECT / INSERT / UPDATE / DELETE / CREATE / DROP / COUNT
/Filter the tree
r, F5Reload the schema
nNew connection
Ctrl+XDisconnect

Other tabs ​

TabKeys
StructureTab / ] and Shift+Tab / [ change section, 1–7 jump to one. In DDL: y copies, e opens it in an editor.
Activityp or Space pauses refreshing, r refreshes, K kills the selected session, Enter shows details
Explainj / k select a plan node; details show below
HistoryType to filter, Enter opens the statement in a new tab
Definitiony copies, e opens it in an editor

Dialogs and prompts ​

KeyDoes
Enter, yConfirm
Esc, n, qCancel
Ctrl+U / Ctrl+KDelete to start / end of the input
Ctrl+WDelete a word

Connections ​

KeyDoes
Enter, clickConnect to the selected saved connection (or go to it, if it's open)
j / k, arrows, wheelMove
n, TabNew connection form
dDelete the selected connection (no confirmation)
EscClose

In the new-connection form:

KeyDoes
Tab / ↑ ↓Move between fields
← / →, SpaceChange the type or TLS mode, tick read-only
EnterConnect (from a text field), or use the Connect button
EscBack to the list

Mouse ​

With mouse = true (the default):

DoTo
ClickFocus a pane; pick a tab, result set, tree item, cell, list item or button
Double-click a cellView it
Click a column header in a table viewSort by it
Middle-click a tabClose it
Drag in the editor or gridSelect
Drag the explorer's edge or the editor/results borderResize
WheelScroll; in lists, move the selection. Shift+wheel scrolls the grid sideways.
Click outside a dialogClose it

Released under the MIT licence.