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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.ninjutsugames.com/game-creator-2/state-machine-2/shortcuts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
