Skip to the content
mantichora_/docs

Keys and the command palette

Two keys get you far: one runs the statement under the cursor, the other finds any command by its name. Every other key is listed here, and each can be changed.

The command palette

Ctrl+P (⌘P on a Mac) opens the Command palette. Type a few words of a command and every word must appear in its name; Enter runs the one highlighted. A command that cannot run now is shown greyed, with the reason beside it, and each row carries its key when it has one.

The keys

On a Mac, Ctrl is ⌘ and Alt is ⌥.

commandkey
Run the statement under the cursorCtrl+Enter
Cancel a running statementCtrl+F2
Explain the statementCtrl+Shift+P
Analyse the statementCtrl+Alt+P
Format statementCtrl+Alt+L
Find in console · Replace in consoleCtrl+F · Ctrl+R
Commit · Roll backCtrl+Alt+K · Ctrl+Alt+R
Apply · Revert the result’s editsCtrl+Shift+Enter · Ctrl+Alt+Z
Export the resultCtrl+Shift+E
Show the cell valueCtrl+Shift+V
New script · Open a SQL file…Ctrl+N · Ctrl+O
Save · Save as…Ctrl+S · Ctrl+Shift+S
ConnectionsCtrl+Shift+C
SettingsCtrl+,
Database panel · History · DiagnosticsCtrl+Shift+B · H · D
Read the selected object againF5
Change the structure of the selected table…Ctrl+F6
Find what uses the selected objectAlt+F7
Back · ForwardCtrl+Alt+← · →
Next tab · Previous tabCtrl+PgDn · PgUp
Zoom in · out · resetCtrl+= · - · 0

Inside the console the editor keeps its own keys as well: undo and redo, select all, Ctrl+/ to comment a line out, Alt+↑ and ↓ to move a line, Shift+Alt+↓ to duplicate it and Ctrl+Shift+K to delete it. Run everything, Begin and Find in result have no key until you give them one.

Changing a key

Help → Keymap opens the Keymap page of Settings, with every command and its key. Click a key to change it, then press the new one; Escape leaves it alone and Backspace takes it away. A key another command already answers to is not taken, and a bare letter cannot be a key, though a function key can. Keys the editor binds inside the console carry a lock and cannot be given to anything else. Reset every key you changed puts them all back.