Most of Mantidb can be used without the mouse. This page lists the default shortcuts. You can change any menu shortcut in Settings ▸ Shortcuts.
Mantidb
| Command | Shortcut |
|---|
| About Mantidb | — |
| Settings… | ⌘, |
| Hide Mantidb | ⌘H |
| Quit Mantidb | ⌘Q |
File
| Command | Shortcut |
|---|
| Connections… | ⌘N |
| New Query Tab | ⌘T |
| Open SQL File… | ⌘O |
| Reload | ⌘R |
| Commit Changes (Save in a query tab) | ⌘S |
| Save As… | ⇧⌘S |
| Discard Changes | — |
| Add Row | ⌘I |
| Import… | ⇧⌘I |
| Export… | ⇧⌘E |
| Back Up Database… | — |
| Restore Database… | — |
| Close (closes the window) | ⌘W |
Edit
| Command | Shortcut |
|---|
| Undo / Redo | ⌘Z / ⇧⌘Z |
| Cut / Copy / Paste | ⌘X / ⌘C / ⌘V |
| Select All | ⌘A |
| Find ▸ Find… | ⌘F |
| Find ▸ Find and Replace… | ⇧⌘F |
| Find ▸ Find Next | ⌘G |
| Find ▸ Find Previous | ⇧⌘G |
| Find ▸ Use Selection for Find | ⌘E |
Query
| Command | Shortcut |
|---|
| Run Current Statement | ⌘↩ |
| Run All | ⇧⌘↩ |
| Save as Favorite… | ⌘D |
| Format SQL | ⌥⌘F |
| Format All | ⌥⇧⌘F |
| Toggle Comment | ⌘/ |
| Shift Right | ⌘] |
| Shift Left | ⌘[ |
View
| Command | Shortcut |
|---|
| Open Anything… | ⌘K |
| Toggle Left Sidebar | ⌘0 |
| Toggle Row Details | ⌥⌘0 |
| Split Pane / Close Split Pane | ⌘\ |
| Process List | ⌥⌘P |
| Users & Roles | ⌥⌘U |
| ER Diagram | ⌥⌘E |
| Metrics Board | ⌥⌘B |
| Appearance ▸ Use System Setting / Light / Dark | — |
Window
| Command | Shortcut |
|---|
| Minimize | ⌘M |
There is no shortcut to close a single tab. ⌘W closes the whole window; close a tab with the × button on the tab.
Context shortcuts
These work in a specific part of the app and aren't in the menu bar.
Data grid
| Key | Action |
|---|
⌘F | Add a filter (+ Filter) when the filter bar is visible |
↩ | Edit the focused cell, or open its editor popover |
Delete / ⌦ | Mark the selected rows for deletion (press again to restore) |
Space | Quick Look the focused cell |
| Arrow keys | Move the cell selection |
⇧ + arrow keys | Extend the cell selection |
⎋ | Go back to row selection |
⌥-click the foreign-key arrow | Peek at the referenced row |
Tabs, popovers and filters
| Where | Key | Action |
|---|
| Tab bar | Double-click a tab | Keep a preview tab open |
| Cell editor popovers | ⌘↩ | Save |
| Cell editor popovers | ⎋ | Cancel / Done |
| Filter editor | ↩ | Apply |
Editor and Assistant
| Where | Key | Action |
|---|
| SQL editor | ⇥ / ⇧⇥ | Indent / outdent the selection |
| Assistant | ⌘↩ or ↩ | Send |
| Where | Key | Action |
|---|
| Process List | ⌘R | Refresh |
| Users & Roles | ⌘S | Create Role / Apply |
| ER Diagram | ⌘− / ⌘0 / ⌘+ | Zoom out / Zoom to fit / Zoom in |
| ER Diagram | ⌘R | Reload |
| Metrics Board | ⌘R | Refresh all widgets, or Preview in the widget editor |
Redis and MongoDB browsers
| Where | Key | Action |
|---|
| Redis browser | ⌘S | Save the key |
| MongoDB browser | ⌘S | Save or insert the document |
| MongoDB browser | ⌘↩ | Find |
Connections and dialogs
| Where | Key | Action |
|---|
| Connection list | ↩ | Connect to the selected connection |
| Connection list | ⌘V | Import a connection URL from the clipboard |
| Dialogs and sheets | ↩ | Default button |
| Dialogs and sheets | ⎋ | Cancel |
Overlapping shortcuts
A few keys do different things depending on where you are:
⌘0 toggles the left sidebar, but in the ER Diagram window it zooms to fit.
⌘R reloads the current tab, but in a tool window it refreshes that window.
⌘F opens Find in the SQL editor, but adds a filter in a table tab.
When a tool window has focus, its own shortcut wins.
Customize shortcuts
Open Mantidb ▸ Settings… (⌘,) and choose Shortcuts to rebind any menu command except the standard macOS ones. A new shortcut must include ⌘ or ⌃, and Mantidb rejects combinations that are already taken. See Settings.