# 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 %}


---

# 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.ninjutsugames.com/game-creator-2/state-machine-2/shortcuts.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.
