# Keyboard shortcuts

Press <kbd>?</kbd> anywhere in the app to see this list.

These are the Mac keys. On Windows and Linux, use Ctrl for ⌘, Alt for ⌥ and
Shift for ⇧.
{.mac-keys}

Shortcuts pause while you type in a field or a dialog is open. Search and the
editor keys still work.

## Change a shortcut

Open **Settings → Shortcuts**, press **Add** beside an action, then press the
keys you want. Esc cancels. Remove a key with its ×, or press **Reset** to bring
back the default. The tables below list the defaults.

A key can do one thing at a time, so adding it to one action takes it from any
other action that had it. Search and the editor keys work while you type, so
they need ⌘ or ⌥.

## General

| Action                    | Keys                                   |
| ------------------------- | -------------------------------------- |
| Search                    | <kbd>⌘</kbd> <kbd>P</kbd>              |
| Undo the last file change | <kbd>⌘</kbd> <kbd>Z</kbd>              |
| Redo                      | <kbd>⌘</kbd> <kbd>⇧</kbd> <kbd>Z</kbd> |
| Show keyboard shortcuts   | <kbd>?</kbd>                           |

## Files

<kbd>N</kbd>, <kbd>⇧</kbd> <kbd>N</kbd>, <kbd>U</kbd> and <kbd>⌘</kbd>
<kbd>A</kbd> work anywhere on the Files page. The rest act on the row that has
focus.

| Action                                     | Keys                           |
| ------------------------------------------ | ------------------------------ |
| New note                                   | <kbd>N</kbd>                   |
| New directory                              | <kbd>⇧</kbd> <kbd>N</kbd>      |
| Upload a file                              | <kbd>U</kbd>                   |
| Previous or next file                      | <kbd>↑</kbd> <kbd>↓</kbd>      |
| Previous or next file, with a preview open | <kbd>←</kbd> <kbd>→</kbd>      |
| First or last file                         | <kbd>Home</kbd> <kbd>End</kbd> |
| Open                                       | <kbd>Enter</kbd>               |
| Select or deselect                         | <kbd>X</kbd>                   |
| Select all                                 | <kbd>⌘</kbd> <kbd>A</kbd>      |
| Rename                                     | <kbd>F2</kbd>                  |
| Move                                       | <kbd>M</kbd>                   |
| Delete                                     | <kbd>⌫</kbd> or <kbd>⌦</kbd>   |
| Clear the selection or close the preview   | <kbd>Esc</kbd>                 |

## Editor

| Action                                   | Keys                                   |
| ---------------------------------------- | -------------------------------------- |
| Switch between editor, split and preview | <kbd>⌘</kbd> <kbd>E</kbd>              |
| Zen mode                                 | <kbd>⌘</kbd> <kbd>.</kbd>              |
| Format the document                      | <kbd>⇧</kbd> <kbd>⌥</kbd> <kbd>F</kbd> |

Notes and drawings save as you go, so you never need <kbd>⌘</kbd> <kbd>S</kbd>.
In the editor, <kbd>⌘</kbd> <kbd>Z</kbd> undoes your typing.

## Version history

| Action          | Keys                      |
| --------------- | ------------------------- |
| Next change     | <kbd>⌥</kbd> <kbd>↓</kbd> |
| Previous change | <kbd>⌥</kbd> <kbd>↑</kbd> |

## Ebooks and PDFs

| Action         | Keys                         |
| -------------- | ---------------------------- |
| Turn the page  | <kbd>←</kbd> <kbd>→</kbd>    |
| Find           | <kbd>⌘</kbd> <kbd>F</kbd>    |
| Zoom in (PDF)  | <kbd>+</kbd> or <kbd>=</kbd> |
| Zoom out (PDF) | <kbd>-</kbd>                 |
