> ## Documentation Index
> Fetch the complete documentation index at: https://ngquct-feat-ai-sql-walkthroughs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Keyboard Shortcuts

> Every keyboard shortcut in TablePro, plus how to rebind them in Settings > Keyboard

# Keyboard Shortcuts

Defaults are listed below. Most shortcuts are rebindable in **Settings** > **Keyboard**; see [Customizing shortcuts](#customizing-shortcuts). The same key can do different things depending on focus: `Cmd+[` indents in the editor and pages back in the data grid.

## Essential

| Action                                     | Shortcut      |
| ------------------------------------------ | ------------- |
| Execute query                              | `Cmd+Enter`   |
| New connection                             | `Cmd+N`       |
| [Quick Switcher](/features/quick-switcher) | `Cmd+Shift+O` |
| Open database switcher                     | `Cmd+K`       |
| Query history                              | `Cmd+Y`       |
| Settings                                   | `Cmd+,`       |
| Close tab / window                         | `Cmd+W`       |
| Quit                                       | `Cmd+Q`       |

## SQL Editor

### Query Execution

| Action                      | Shortcut           |
| --------------------------- | ------------------ |
| Execute query               | `Cmd+Enter`        |
| Execute all statements      | `Cmd+Shift+Enter`  |
| Execute query without limit | `Cmd+Option+Enter` |
| Cancel query                | `Cmd+.`            |
| Explain query               | `Cmd+Option+E`     |
| Explain with AI             | `Cmd+L`            |
| Optimize with AI            | `Cmd+Option+L`     |
| Format query                | `Cmd+Shift+L`      |
| Preview SQL                 | `Cmd+Shift+P`      |
| Save as favorite            | `Cmd+D`            |

### File Operations

| Action        | Shortcut      |
| ------------- | ------------- |
| Open SQL file | `Cmd+O`       |
| Save file     | `Cmd+S`       |
| Save As       | `Cmd+Shift+S` |

### Text Editing and Find

| Action           | Shortcut      |
| ---------------- | ------------- |
| Toggle comment   | `Cmd+/`       |
| Indent           | `Cmd+[`       |
| Outdent          | `Cmd+]`       |
| Duplicate line   | `Cmd+Shift+D` |
| Delete line      | `Cmd+Shift+K` |
| Move line up     | `Option+Up`   |
| Move line down   | `Option+Down` |
| Show completions | `Ctrl+Space`  |
| Find             | `Cmd+F`       |
| Find next        | `Cmd+G`       |
| Find previous    | `Cmd+Shift+G` |

Every row except Find Next and Find Previous is built into the editor and cannot be rebound. Standard macOS text navigation and clipboard keys also apply.

## Data Grid

### Navigation and Selection

| Action                        | Shortcut                |
| ----------------------------- | ----------------------- |
| Move between cells            | Arrow keys              |
| Next / previous cell          | `Tab` / `Shift+Tab`     |
| Scroll to first / last row    | `Home` / `End`          |
| Scroll page up / down         | `Page Up` / `Page Down` |
| Extend selection by one cell  | `Shift+Arrow`           |
| Extend selection to grid edge | `Cmd+Shift+Arrow`       |
| Select all                    | `Cmd+A`                 |
| Clear selection               | `Escape`                |

### Editing

| Action               | Shortcut                 |
| -------------------- | ------------------------ |
| Edit cell            | `Enter`                  |
| Cancel edit          | `Escape`                 |
| Add row              | `Cmd+Shift+N`            |
| Duplicate row        | `Cmd+Shift+D`            |
| Delete selected rows | `Delete` or `Cmd+Delete` |
| Truncate table       | `Option+Delete`          |
| Preview FK reference | `Space`                  |
| Commit changes       | `Cmd+S`                  |
| Undo change          | `Cmd+Z`                  |
| Redo change          | `Cmd+Shift+Z`            |

### Clipboard

| Action            | Shortcut       |
| ----------------- | -------------- |
| Cut               | `Cmd+X`        |
| Copy              | `Cmd+C`        |
| Copy rows as TSV  | `Cmd+Shift+C`  |
| Copy with headers | `Cmd+Option+C` |
| Copy as JSON      | `Cmd+Option+J` |
| Paste             | `Cmd+V`        |

With a drag-selected cell range, `Cmd+C` copies the range as TSV. With a single focused cell it copies that value. Otherwise it copies the selected rows as TSV.

### Pagination

| Action        | Shortcut          |
| ------------- | ----------------- |
| Previous page | `Cmd+[`           |
| Next page     | `Cmd+]`           |
| First page    | `Cmd+Option+Up`   |
| Last page     | `Cmd+Option+Down` |

<Note>
  `Cmd+[` and `Cmd+]` page the data grid. In the SQL editor the same keys indent and outdent. Focus decides which fires.
</Note>

### Filtering

| Action                          | Shortcut    |
| ------------------------------- | ----------- |
| Toggle filter panel (table tab) | `Cmd+F`     |
| Apply filters                   | `Cmd+Enter` |

See [Filtering](/features/filtering) for the filter panel itself.

### Import and Export

| Action | Shortcut      |
| ------ | ------------- |
| Export | `Cmd+Shift+E` |
| Import | `Cmd+Shift+I` |

## Tabs and Windows

| Action             | Shortcut                |
| ------------------ | ----------------------- |
| New tab            | `Cmd+T`                 |
| Close tab / window | `Cmd+W`                 |
| Reopen closed tab  | `Cmd+Shift+T`           |
| Select tab 1-9     | `Cmd+1` through `Cmd+9` |
| Previous tab       | `Cmd+Shift+[`           |
| Next tab           | `Cmd+Shift+]`           |
| Minimize           | `Cmd+M`                 |

## Connections

| Action                 | Shortcut                    |
| ---------------------- | --------------------------- |
| New connection         | `Cmd+N`                     |
| Manage connections     | none by default, rebindable |
| Switch connection      | `Ctrl+Cmd+C`                |
| Open database switcher | `Cmd+K`                     |
| Refresh                | `Cmd+R`                     |

## Sidebar, Panels, and View

| Action                           | Shortcut       |
| -------------------------------- | -------------- |
| Toggle sidebar                   | `Cmd+0`        |
| Focus sidebar filter             | `Cmd+Option+F` |
| Show Tables sidebar              | `Cmd+Option+1` |
| Show Favorites sidebar           | `Cmd+Option+2` |
| Toggle inspector panel           | `Cmd+Option+I` |
| Toggle results                   | `Cmd+Option+R` |
| Query history                    | `Cmd+Y`        |
| Increase text size (editor font) | `Cmd+=`        |
| Decrease text size (editor font) | `Cmd+-`        |
| Toggle full screen               | `Ctrl+Cmd+F`   |

### Result Tabs

| Action           | Shortcut       |
| ---------------- | -------------- |
| Previous result  | `Cmd+Option+[` |
| Next result      | `Cmd+Option+]` |
| Pin result       | `Cmd+Option+P` |
| Close result tab | `Cmd+Shift+W`  |

### Query History Panel

With the panel open (`Cmd+Y`): `Return` loads the selected entry in the editor, `Delete` removes it, `Cmd+C` copies its query.

## Welcome Window

| Action                      | Shortcut             |
| --------------------------- | -------------------- |
| Focus connection search     | `Cmd+F`              |
| Select all connections      | `Cmd+A`              |
| Delete selected connections | `Cmd+Delete`         |
| Clear selection             | `Escape`             |
| Next connection             | `Ctrl+J` or `Ctrl+N` |
| Previous connection         | `Ctrl+K` or `Ctrl+P` |
| Collapse group              | `Ctrl+H`             |
| Expand group                | `Ctrl+L`             |

`Ctrl+J`/`Ctrl+N` and `Ctrl+K`/`Ctrl+P` also move the selection in the [Quick Switcher](/features/quick-switcher).

## CSV Inspector

| Action                                   | Shortcut                    |
| ---------------------------------------- | --------------------------- |
| Save                                     | `Cmd+S`                     |
| Save As                                  | `Cmd+Shift+S`               |
| Toggle filter bar                        | `Cmd+F`                     |
| Switch first row between header and data | `Cmd+Shift+H`               |
| Copy selected rows as TSV                | `Cmd+C`                     |
| Paste TSV as new rows                    | `Cmd+V`                     |
| Add secondary sort column                | `Shift+Click` column header |
| Undo                                     | `Cmd+Z`                     |
| Redo                                     | `Cmd+Shift+Z`               |
| Close                                    | `Cmd+W`                     |

See [CSV Inspector](/features/csv-inspector).

## Vim Mode

Turn on Vim mode in **Settings** > **Editor**. Vim keys apply only in the SQL editor; the data grid keeps its shortcuts, and `Cmd+Enter` runs the query in any mode. See [Vim Mode](/features/vim-mode) for the key reference.

## Customizing Shortcuts

Open **Settings** (`Cmd+,`) > **Keyboard**. Each action has a recorder field: click it and press the new combination. The menu bar updates immediately. Use the search field to filter actions, press `Delete` in a recorder field to clear a binding, click the curved-arrow button next to a changed shortcut to restore that one action, or **Reset to Defaults** to restore all. See [Settings](/customization/settings) for the other tabs.

<Frame caption="Keyboard shortcut customization">
  <img className="block dark:hidden" src="https://mintcdn.com/ngquct-feat-ai-sql-walkthroughs/Bj1EoTflf_jG6N_3/images/settings-keyboard.png?fit=max&auto=format&n=Bj1EoTflf_jG6N_3&q=85&s=1bbaa2d744dc124527afbfaa3f0c0173" alt="Keyboard settings" width="1560" height="960" data-path="images/settings-keyboard.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/ngquct-feat-ai-sql-walkthroughs/Bj1EoTflf_jG6N_3/images/settings-keyboard-dark.png?fit=max&auto=format&n=Bj1EoTflf_jG6N_3&q=85&s=7ec6632b31c3d12e369f83ae3945d1b5" alt="Keyboard settings" width="1560" height="960" data-path="images/settings-keyboard-dark.png" />
</Frame>

If a combination is already used by another action in the same context, TablePro shows a dialog naming that action: **Cancel** keeps the existing assignment, **Reassign** moves the shortcut and clears it from the other action. Editor and data grid shortcuts can share a key without conflict because focus decides which fires.

Menu actions need a modifier (`Cmd`, `Option`, `Ctrl`, or `Shift`); function keys `F1` through `F12` work bare, as do grid actions that read the key directly, like Preview FK Reference (`Space`).

<Warning>
  Some shortcuts cannot be reassigned: editor built-ins (like `Cmd+/`), tab selection (`Cmd+1` through `Cmd+9`), text size (`Cmd+=`, `Cmd+-`), and macOS system shortcuts, which TablePro reads live from System Settings. The recorder warns if you try.
</Warning>

## Outside the App

TablePro can be driven without app shortcuts at all: the Raycast extension, the `tablepro://` URL scheme, and MCP clients are covered in the [External API](/external-api/index) section.
