# Keyboard Shortcuts

> Every Schemity keyboard shortcut in one table - create entities and fields, move and reorder with arrows or Vim keys, search, lint, impact analysis, export, and tabs.

Source: https://schemity.com/doc/keyboard-shortcuts/

Schemity is built to be driven from the keyboard: you can create entities, add fields, reorder them, move tables around the canvas, and search the diagram without touching the mouse. Arrow keys and the Vim keys `H`/`J`/`K`/`L` are interchangeable everywhere. On macOS use `⌘` where Windows and Linux use `Ctrl`. Press **F1** in the app for the same list, and **`⌘K`** / **`Ctrl+K`** for the command palette, which finds any action by name.

## Which shortcuts open the main tools?

| Action | macOS | Windows / Linux |
|---|---|---|
| Show the shortcut list | `F1` | `F1` |
| Command palette | `⌘K` or `⌘⇧P` | `Ctrl+K` or `Ctrl+Shift+P` |
| Find entities, fields, and legends | `⌘F` | `Ctrl+F` |
| Search diagrams across all workspaces (in the diagram list) | `⌘F` | `Ctrl+F` |
| History (every undo step) | `F6` | `F6` |
| [Impact analysis](https://schemity.com/doc/impact-analysis/) of the pending migration | `F7` | `F7` |
| Analyse a migration file or pasted SQL | `⇧F7` | `Shift+F7` |
| [Schema Lint](https://schemity.com/doc/schema-lint/) (`Esc` closes it) | `F8` | `F8` |
| [MCP](https://schemity.com/doc/ai-assisted-design/) panel | `⌘⇧A` | `Ctrl+Shift+A` |
| [Context views](https://schemity.com/doc/context-views/) | `⌘⇧V` | `Ctrl+Shift+V` |
| Connection list | `⌘⇧C` | `Ctrl+Shift+C` |
| Show or hide the minimap | `⌘⇧M` | `Ctrl+Shift+M` |
| Open the workspace folder | `⌘⇧O` | `Ctrl+Shift+O` |

## How do I create and edit entities, fields, and legends?

| Action | macOS | Windows / Linux |
|---|---|---|
| Create an entity, or edit the selected one | `⌘⇧E` | `Ctrl+Shift+E` |
| Add a field to the selected entity, or edit the selected field | `⌘⇧F` | `Ctrl+Shift+F` |
| Create a legend, or edit the selected one | `⌘⇧L` | `Ctrl+Shift+L` |
| Edit the selected entity, legend, or field | `Enter` | `Enter` |
| Edit the selected relationship | `Enter` | `Enter` |
| Rename the selected entity, field, or legend in place | `F2` | `F2` |
| Show a field's ENUM or CHECK (IN ...) values | `⌘O` | `Ctrl+O` |
| [Templates](https://schemity.com/doc/templates/) | `⌘⇧T` | `Ctrl+Shift+T` |
| Save the field and move on to the next (in the field form) | `⌘Enter` | `Ctrl+Enter` |

## How do I move around and rearrange the diagram?

| Action | macOS | Windows / Linux |
|---|---|---|
| Select the next entity in a direction | `Arrows` or `H`/`J`/`K`/`L` | `Arrows` or `H`/`J`/`K`/`L` |
| Move the selected entities 1 pixel | `⌘` + `Arrows` or `H`/`J`/`K`/`L` | `Ctrl` + `Arrows` or `H`/`J`/`K`/`L` |
| Move the selected entities 20 pixels | `⌘⇧` + `Arrows` or `H`/`J`/`K`/`L` | `Ctrl+Shift` + `Arrows` or `H`/`J`/`K`/`L` |
| Step into the selected entity's first field | `⌘Enter` | `Ctrl+Enter` |
| Move between fields | `Up`/`Down` or `K`/`J` | `Up`/`Down` or `K`/`J` |
| Move the selected field up or down | `⌘` + `Up`/`Down` or `K`/`J` | `Ctrl` + `Up`/`Down` or `K`/`J` |
| Leave the field and select its entity | `Esc` | `Esc` |
| Straighten the selected relationship line | `⌘⇧Enter` | `Ctrl+Shift+Enter` |
| Select all entities | `⌘A` | `Ctrl+A` |
| Add to the selection | `Shift`+click or `⌘`+click | `Shift`+click or `Ctrl`+click |
| Add a box selection | `Shift`+drag or `⌘`+drag | `Shift`+drag or `Ctrl`+drag |

## Which shortcuts edit, copy, and export?

| Action | macOS | Windows / Linux |
|---|---|---|
| Save the diagram | `⌘S` | `Ctrl+S` |
| Undo | `⌘Z` | `Ctrl+Z` |
| Redo | `⌘⇧Z` or `⌘Y` | `Ctrl+Shift+Z` or `Ctrl+Y` |
| Delete the selection | `Delete` or `Backspace` | `Delete` or `Backspace` |
| Copy an entity or field | `⌘C` | `Ctrl+C` |
| Paste an entity or field | `⌘V` | `Ctrl+V` |
| Duplicate the selected field or entities | `⌘D` | `Ctrl+D` |
| [Import SQL](https://schemity.com/doc/reverse-engineer-database/), or import entities into a context view | `⌘⇧I` | `Ctrl+Shift+I` |
| Get SQL for the selected entity or legend | `⌘⇧S` | `Ctrl+Shift+S` |
| Export the diagram as an image | `⌘E` | `Ctrl+E` |

## Which shortcuts manage tabs?

| Action | macOS | Windows / Linux |
|---|---|---|
| Jump to tab 1-9 | `⌘1` ... `⌘9` | `Ctrl+1` ... `Ctrl+9` |
| Close the current tab | `⌘W` | `Ctrl+W` |
| Reset the current diagram (re-read the database) | `⌘R` | `Ctrl+R` |
| Back to the diagram list | `⌘B` | `Ctrl+B` |
| Quit (asks first if any tab has unsaved changes) | `⌘Q` | `Ctrl+Q` |

See [Tabs & Navigation](https://schemity.com/doc/tabs-and-navigation/) for how tabs track unsaved changes.

## Do shortcuts work in context views and on the Context Map?

Mostly. A [context view](https://schemity.com/doc/context-views/) cannot create entities or change the schema, so the shortcuts that would are ignored there, and `⌘⇧I` / `Ctrl+Shift+I` imports entities into the view instead of importing SQL. On the [Context Map](https://schemity.com/doc/context-map/) only the shortcuts that make sense for the map work: save, undo and redo, find, export, and close tab.

In Schemity Lite, four shortcuts are left to the browser because it already owns them: `⌘1`-`⌘9` / `Ctrl+1`-`Ctrl+9` switch browser tabs, `⌘W` / `Ctrl+W` closes the browser tab, `⌘R` / `Ctrl+R` reloads the page, and `⌘⇧T` / `Ctrl+Shift+T` reopens a closed tab.

## Next

Take the [Quick Start](https://schemity.com/doc/quick-start/) tour and try the shortcuts on a real diagram.
