Keyboard cheat sheet
Every QueryDeck keyboard shortcut in one place. Print and pin.
For: everyone.
This page lists every default keyboard shortcut. Shortcuts can be customized in Settings → Keyboard.
Global
| Action | Shortcut |
|---|---|
| Command Palette | Cmd+K |
| Open AI Assistant | Cmd+I |
| New connection | Cmd+N |
| Open Settings | Cmd+, |
| Quit | Cmd+Q |
| Help / Docs | Cmd+? |
| Search current view | Cmd+F |
| Refresh schema | Cmd+R |
Window and tabs
| Action | Shortcut |
|---|---|
| New tab | Cmd+T |
| Close tab | Cmd+W |
| New window | Cmd+Shift+N |
| Close window | Cmd+Shift+W |
| Switch to tab 1, 2 ... 9 | Cmd+1 ... Cmd+9 |
| Next tab | Cmd+] or Ctrl+Tab |
| Previous tab | Cmd+[ or Ctrl+Shift+Tab |
| Show / hide sidebar | Cmd+0 |
Query editor
| Action | Shortcut |
|---|---|
| Run query | Cmd+Return |
| Run selected text | Cmd+Shift+Return |
| Cancel running query | Cmd+. |
| Format SQL | Cmd+Shift+F |
| Find in editor | Cmd+F |
| Find and replace | Cmd+Option+F |
| Toggle line comment | Cmd+/ |
| Toggle block comment | Cmd+Option+/ |
| Add cursor (multi-cursor) | Option+Click |
| Indent line | Tab |
| Outdent line | Shift+Tab |
| Move line up | Option+↑ |
| Move line down | Option+↓ |
| Save current query | Cmd+S |
| Save query as... | Cmd+Shift+S |
| Explain query | Cmd+Option+E |
| Optimize with AI | Cmd+Option+O |
Results grid
| Action | Shortcut |
|---|---|
| Copy selection | Cmd+C |
| Copy as INSERT | Cmd+Shift+C |
| Copy as JSON | Cmd+Option+J |
| Select all rows | Cmd+A |
| Export results | Cmd+Shift+E |
| Focus filter field | Cmd+L |
Table Mode
| Action | Shortcut |
|---|---|
| Open table by name | Cmd+K → type name |
| New row | Cmd+N |
| Set cell to NULL | Cmd+Delete |
| Set cell to default | Cmd+Shift+Delete |
| Revert edited cell | Cmd+Z while editing |
| Commit pending changes | Cmd+Return |
| Discard pending changes | Cmd+Escape |
| Open preview before commit | Cmd+P |
| Next FK | Cmd+→ on the cell |
| Previous related row | Cmd+← |
Notebooks
| Action | Shortcut |
|---|---|
| Run current cell | Cmd+Return (inside cell) |
| Run current cell and move next | Cmd+Shift+Return |
| Run all cells | Cmd+Option+Return |
| Add SQL cell below | Cmd+Shift+A |
| Add Markdown cell below | Cmd+Shift+M |
| Move cell up | Cmd+Option+↑ |
| Move cell down | Cmd+Option+↓ |
| Duplicate cell | Cmd+D |
| Delete cell | Cmd+Backspace |
| Toggle Markdown preview | Cmd+E |
AI Assistant
| Action | Shortcut |
|---|---|
| Open AI panel | Cmd+I |
| Submit prompt | Cmd+Return (in chat) |
| New conversation in current tab | Cmd+Shift+I |
| Insert AI response into editor | Cmd+Option+Return (when reply has SQL) |
| Run AI response in editor | Cmd+Shift+Option+Return |
Drift Mode
| Action | Shortcut |
|---|---|
| Switch to Drift Mode | Cmd+5 |
| Refresh drift check | Cmd+R |
| Run Fix on selected card | Cmd+Return (with card focused) |
| Fix All | Cmd+Shift+Return |
Navigation between modes
QueryDeck has four primary modes per connection. Switch between them:
| Mode | Shortcut |
|---|---|
| Query | Cmd+1 |
| Table Mode | Cmd+2 |
| ERD | Cmd+3 |
| Drift | Cmd+4 |
| Notebook | Cmd+5 |
These work when you're connected and have the mode bar visible.
Customizing
Settings → Keyboard shows every shortcut and lets you rebind. Click a row, press the new combination, save.
Conflicts (two actions on the same combination) are flagged with a yellow warning. Resolve before closing.
To reset everything to defaults: Settings → Keyboard → Reset all shortcuts.
Vim mode
Vim keybindings inside the SQL editor are available behind a flag: Settings → Editor → Vim mode. The cell-level shortcuts and global shortcuts above are unchanged; only the in-editor movement uses Vim bindings when enabled.
Esc enters normal mode. i enters insert mode. The full set follows standard Vim — see :help inside the editor for the supported commands.
What's next
- Command Palette — the universal "do anything" shortcut
- Query editor for context on where each editor shortcut applies