# Shortcut Keys

The list of shortcut keys and how to use them in TablePlus

| Shortcut Key               | Description                                       | Scope                           |
| -------------------------- | ------------------------------------------------- | ------------------------------- |
| ⌘ + N                      | Open a new connection                             | Global                          |
| ⌘ + ,                      | Open Preference                                   | Global                          |
| ⌘ + Q                      | Quit app                                          | Global                          |
| ⌘ + ⇧ + O                  | New SQL Viewer                                    | Global                          |
| ⌘ + W                      | Close a tab/window                                | Workspace                       |
| ⌘ + S                      | Commit the changes                                | Workspace                       |
| ⌘ + ⇧ + P                  | Preview the changes                               | Workspace                       |
| ⌘ + ⇧ + Delete             | Discard the changes                               | Workspace                       |
| ⌘ + T                      | Open a new tab                                    | Workspace                       |
| ⌘ + L                      | Open plugin manager                               | Workspace                       |
| ⌘ + ⇧ + C                  | Toggle console log                                | Workspace                       |
| ⌘ + .                      | Run custom script                                 | Workspace                       |
| ⌘ + R                      | Reload workspace                                  | Workspace                       |
| ⌘ + \[                     | Navigate to left tab                              | Workspace                       |
| ⌘ + ]                      | Navigate to right tab                             | Workspace                       |
| ⇧ + ⌘ + \[                 | Navigate to left Pane                             | Workspace                       |
| ⇧ + ⌘ + ]                  | Navigate to right Pane                            | Workspace                       |
| ⌘ + ⇧ + D                  | Split Pane Horizontally                           | Workspace                       |
| ⌘ + Number                 | Navigate to number tab                            | Workspace                       |
| ⌘ + K                      | Switch database                                   | Workspace                       |
| ⌘ + ⇧ + K                  | Switch Connection                                 | Workspace                       |
| ⌘ + I or ⌃ + I             | Indent selected SQL Code                          | Workspace - SQL Tab, SQL Viewer |
| ⌘ + ⏎                      | Execute SQL Code                                  | Workspace - SQL Tab             |
| ⌘ + O                      | Open file SQL                                     | Workspace - SQL Tab             |
| ⌘ + I                      | Beautify selected SQL statements                  | Workspace - SQL Tab             |
| ⇧ + ⌘ + I                  | Uglify selected SQL statements                    | Workspace - SQL Tab             |
| ⇧ + ⌘ + S                  | Save selected SQL statements as                   | Workspace - SQL Tab             |
| ⌘ + /                      | Comment/Uncomment lines of SQL                    | Workspace - SQL Tab             |
| ⌘ + Click                  | Add cursors at arbitrary positions                | Workspace - SQL Tab             |
| ⌃ + ⇧ + **↑**              | Add additional cursors above the current line     | Workspace - SQL Tab             |
| ⌃ + ⇧ + **↓**              | Add additional cursors below the current line     | Workspace - SQL Tab             |
| ⌘ + D                      | Select the next instance of the current highlight | Workspace - SQL Tab             |
| ⌘ + ⌃ + G                  | Select all instances of the current highlight     |                                 |
| ⌘ + Z                      | Undo                                              | Workspace                       |
| ⌘ + ⇧ + Z                  | Redo                                              | Workspace                       |
| ⌘ + P                      | Open anything                                     | Workspace                       |
| ⌘ + E                      | Open SQL Query                                    | Workspace                       |
| Middle mouse click on Cell | Open quick look                                   | Table Data                      |
| Space                      | Toggle row detail when row selected               | Table Data                      |
| ⌘ + C                      | Copy rows                                         | Table Data                      |
| ⌘ + V                      | Paste rows                                        | Table Data                      |
| ⌘ + D                      | Duplicate row                                     | Table Data                      |
| ⌘ + I                      | Insert a new row                                  | Table Data                      |
| ⌘ + F                      | Open Row Filter                                   | Table Data                      |
| ⌘ + ⌥ + F                  | Open Column Filter                                | Table Data                      |
| ⌥ + click on field         | Open Quick edit Menu                              | Workspace - Table Data          |
| Tab                        | Move focus while editing                          | Workspace - Table Data          |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tableplus.com/utilities/shortcut-keys.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
