> For the complete documentation index, see [llms.txt](https://docs.ninjutsugames.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ninjutsugames.com/game-creator-2/state-machine-2/shortcuts.md).

# Shortcuts

State Machine 2 includes many keyboard shortcuts to speed up your workflow in the Graph Editor.

## General

| Shortcut (Mac) | Shortcut (Windows) | Description                                             |
| -------------- | ------------------ | ------------------------------------------------------- |
| Space          | Space              | Open node creation menu                                 |
| Cmd + S        | Ctrl + S           | Save the state machine                                  |
| F              | F                  | Focus on selection, or center graph if nothing selected |

## Selection & Editing

| Shortcut (Mac) | Shortcut (Windows) | Description              |
| -------------- | ------------------ | ------------------------ |
| Cmd + A        | Ctrl + A           | Select all nodes         |
| Cmd + C        | Ctrl + C           | Copy selected nodes      |
| Cmd + V        | Ctrl + V           | Paste copied nodes       |
| Cmd + X        | Ctrl + X           | Cut selected nodes       |
| Cmd + D        | Ctrl + D           | Duplicate selected nodes |
| Delete         | Delete             | Delete selected nodes    |

## Organization

| Shortcut (Mac) | Shortcut (Windows) | Description                     |
| -------------- | ------------------ | ------------------------------- |
| Cmd + G        | Ctrl + G           | Group or ungroup selected nodes |

## Alignment

| Shortcut (Mac) | Shortcut (Windows) | Description                                     |
| -------------- | ------------------ | ----------------------------------------------- |
| Cmd + Alt + ←  | Ctrl + Alt + ←     | Align selected nodes to the left                |
| Cmd + Alt + →  | Ctrl + Alt + →     | Align selected nodes to the right               |
| Cmd + Alt + ↑  | Ctrl + Alt + ↑     | Align selected nodes to the top                 |
| Cmd + Alt + ↓  | Ctrl + Alt + ↓     | Align selected nodes to the bottom              |
| Cmd + Alt + C  | Ctrl + Alt + C     | Align selected nodes to the center (horizontal) |
| Cmd + Alt + M  | Ctrl + Alt + M     | Align selected nodes to the middle (vertical)   |

## Navigation

| Shortcut (Mac)    | Shortcut (Windows) | Description        |
| ----------------- | ------------------ | ------------------ |
| Scroll Wheel      | Scroll Wheel       | Zoom in/out        |
| Middle Mouse Drag | Middle Mouse Drag  | Pan the graph view |
| Right Mouse Drag  | Right Mouse Drag   | Pan the graph view |

{% hint style="info" %}
**Tip**: Press **Space** anywhere on the canvas to quickly open the node creation menu at your cursor position.
{% endhint %}
