# Keyboard shortcuts

> Every shortcut in Songcode, by where it works.

Shortcuts are written here the way a Mac shows them. On Windows and Linux, read `⌘` as `ctrl`. The one exception is the code editor, which uses `ctrl` on every system.

## Everywhere

| keys | what it does |
|---|---|
| `space` | Play or pause. Not while typing in a field or in the code editor, and not while a button has focus. |
| `⌘↵` | Generate. While a track is being written, stop. Works anywhere outside the code editor. |
| `⌘S` | Save the draft now. Drafts are saved as you work anyway; publishing is always a click on **publish**. |
| `⌘O` | Open a `.songcode` or `.ode` file. |
| `esc` | Close the open sheet, menu or drawer. |

## The code editor

These apply while the cursor is in the code.

| keys | what it does |
|---|---|
| `ctrl` `↵` or `alt` `↵` | Apply your edits to the playing track, the same as **update**. |
| `ctrl` `.` or `alt` `.` | Stop. |
| `⌘Z` and `⇧⌘Z` | Undo and redo typing. |

See [the code view](https://docs.songco.de/app/code/#hear-an-edit).

## The scrub line

The line along the bottom of the transport. Reach it with `tab`.

| keys | what it does |
|---|---|
| `←` `→` | Move one bar. |
| `shift` with an arrow | Move one beat. |
| `home` | Go to the start. |
| `end` | Go to the last bar. |
| `alt` while dragging | Place the playhead freely, off the grid. |

See [play a track](https://docs.songco.de/app/playback/).

## The stems view

| keys | what it does |
|---|---|
| `⌘Z` | Undo the last change to the track. |
| `⇧⌘Z` or `ctrl` `Y` | Redo. |
| `←` `→` | Move the playhead one bar. With `shift`, one beat. |
| `home` | Playhead to the start. |
| `⌘` and scroll, or pinch | Zoom the timeline around the pointer. |
| `shift` and scroll | Move along a zoomed timeline. |
| `alt` while dragging the ruler | Place the playhead freely. |

Undo and redo work anywhere in the window except inside a text field, which keeps its own undo. See [the stems view](https://docs.songco.de/app/stems/#the-timeline).

## The note editor

These apply while the piano roll or the drum grid has focus. Click in it first.

| keys | what it does |
|---|---|
| `⌘A` | Select every note. |
| `esc` | Select none. |
| `delete` | Remove the selected notes. |
| `↑` `↓` | Move the selection one semitone. With `shift`, one octave. |
| `←` `→` | Move the selection one snap step. With `shift`, one beat. |
| `⌘D` | Repeat the selection right after itself. |
| `Q` | Quantize the selection to the snap grid. |
| `shift`-click | Add a note to the selection. |
| `alt` and drag | Copy the notes you drag. |

See [edit a stem](https://docs.songco.de/app/stem-editor/).

## Fields and sheets

| where | keys | what it does |
|---|---|---|
| The title | `↵` or `esc` | Finish renaming. |
| The key sheet | `↵` | Save the key. |
| The inspector's regenerate box | `⌘↵` | Regenerate the stem. |
| The inspector's code box | `⌘↵` | Apply the code. |
| The bpm field in the song bar | `↵` | Set the tempo. |
| The feedback sheet | `⌘↵` | Send. |
| A panel border | `←` `→`, with `shift` for bigger steps | Resize the panels. |

## The first-visit tour

These apply while [the tour](https://docs.songco.de/app/#the-first-visit-tour) is up.

| keys | what it does |
|---|---|
| `→` or `↵` | The next step. |
| `←` | The step before. |
| `esc` | Close the tour. |

## These docs

`/` or `⌘K` opens search on any page. `↑` and `↓` move through the results and `↵` opens one.

---

This page on the web: https://docs.songco.de/help/shortcuts/
Every page of the Songcode docs, for agents: https://docs.songco.de/llms.txt (index) and https://docs.songco.de/llms-full.txt (all of it in one file).
