# Keyboard shortcuts

> Every default shortcut in Terra, grouped the way Settings › Hotkeys groups them, and how to change, reset or remove one.

Source: https://terramd.io/docs/keyboard-shortcuts

These are Terra's default shortcuts. To see them in the app, and to change them, open **Settings › Hotkeys**: press <kbd>⌘</kbd> <kbd>,</kbd> and click **Hotkeys**, or choose **Help › Keyboard Shortcuts**. The groups below follow the same order.

Keys are shown in the order macOS uses: <kbd>⌃</kbd> Control, <kbd>⌥</kbd> Option, <kbd>⇧</kbd> Shift, <kbd>⌘</kbd> Command. Where a command has more than one shortcut, any of them works.

![Settings, Hotkeys pane, showing the Global group: Command palette, New note, Quick capture, Go to file, Settings, New…, Open library, Light or dark, Zoom in, Zoom out and Actual size, each with its keys.](https://terramd.io/docs/shots/start-hotkeys.webp "Settings › Hotkeys lists every command with its keys. Commands without keys are blank until you give them some.")

## Global

| Action | Shortcut |
| --- | --- |
| Command palette | <kbd>⌘</kbd> <kbd>K</kbd> or <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>P</kbd> |
| New note | <kbd>⌘</kbd> <kbd>N</kbd> |
| Go to file (open a note by name) | <kbd>⌘</kbd> <kbd>P</kbd> |
| Settings | <kbd>⌘</kbd> <kbd>,</kbd> |
| Open library (switch to another Library) | <kbd>⌘</kbd> <kbd>O</kbd> |
| Light or dark | <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>L</kbd> |
| Zoom in (make the interface larger) | <kbd>⌘</kbd> <kbd>=</kbd> or <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>=</kbd> |
| Zoom out | <kbd>⌘</kbd> <kbd>-</kbd> |
| Actual size | <kbd>⌘</kbd> <kbd>0</kbd> |
| Close window | <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>W</kbd> |

No keys by default: **Quick capture** and **New…**. Separately, <kbd>⌃</kbd> <kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>N</kbd> opens quick capture from any app, even when Terra is in the background. That one isn't listed in Settings › Hotkeys.

## Navigation

| Action | Shortcut |
| --- | --- |
| Sidebar (show or hide) | <kbd>⌘</kbd> <kbd>B</kbd> |
| Properties (show or hide the panel on the right) | <kbd>⌘</kbd> <kbd>R</kbd> or <kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>B</kbd> |
| Search | <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>F</kbd> |
| Toggle view mode (Edit or Read) | <kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>E</kbd> |
| Cycle database layout | <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>V</kbd> |
| Zen mode | <kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>Z</kbd> |
| Terminal | <kbd>⌘</kbd> <kbd>J</kbd> |
| Back | <kbd>⌘</kbd> <kbd>[</kbd> |
| Forward | <kbd>⌘</kbd> <kbd>]</kbd> |
| Reveal in sidebar (show the open note's folder) | <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>E</kbd> |

No keys by default: **Database drawer**, **Comments**, **Versions**, **AI conversations**, **Source mode** and **Reader mode**.

With text selected in a note, <kbd>⌘</kbd> <kbd>B</kbd> makes it bold instead of hiding the sidebar.

## Panes and tabs

| Action | Shortcut |
| --- | --- |
| Split (open a second pane to the right) | <kbd>⌘</kbd> <kbd>&#92;</kbd> |
| Previous pane | <kbd>⌃</kbd> <kbd>⌥</kbd> <kbd>←</kbd> |
| Next pane | <kbd>⌃</kbd> <kbd>⌥</kbd> <kbd>→</kbd> |
| Close tab | <kbd>⌘</kbd> <kbd>W</kbd> |
| Reopen closed tab | <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>T</kbd> |
| Next tab | <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>]</kbd> or <kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>→</kbd> or <kbd>⌃</kbd> <kbd>Tab</kbd> |
| Previous tab | <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>[</kbd> or <kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>←</kbd> or <kbd>⌃</kbd> <kbd>⇧</kbd> <kbd>Tab</kbd> |
| Focus pane 1 to 9, in reading order | <kbd>⌘</kbd> <kbd>1</kbd> to <kbd>⌘</kbd> <kbd>9</kbd> |
| Tab 1 to 9 of the focused pane | <kbd>⌃</kbd> <kbd>1</kbd> to <kbd>⌃</kbd> <kbd>9</kbd> |
| Last tab of the focused pane | <kbd>⌃</kbd> <kbd>0</kbd> |

- <kbd>⌘</kbd> <kbd>W</kbd> closes the tab you're in, and a pane closes with its last tab. With only one tab left in the window, it closes the window.
- A window holds up to four panes, so only <kbd>⌘</kbd> <kbd>1</kbd> to <kbd>⌘</kbd> <kbd>4</kbd> ever have a pane to go to. Previous pane and Next pane stop at the first and last pane rather than wrapping around.
- <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>T</kbd> remembers the last 20 tabs you closed, until you quit.

## Editor

| Action | Shortcut |
| --- | --- |
| Save (Terra also saves as you type) | <kbd>⌘</kbd> <kbd>S</kbd> |
| Duplicate (the selected block, or the open note) | <kbd>⌘</kbd> <kbd>D</kbd> |
| Find in page | <kbd>⌘</kbd> <kbd>F</kbd> |
| Redo | <kbd>⌘</kbd> <kbd>Y</kbd> |
| Copy link to note (a `terra://` link to the open note) | <kbd>⌘</kbd> <kbd>L</kbd> |
| Comment (opens the note's comments) | <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>M</kbd> |

No keys by default: **Slash commands** and **Reload theme**.

## Other

| Action | Shortcut |
| --- | --- |
| Side by side (two panes) | <kbd>⌃</kbd> <kbd>⌥</kbd> <kbd>1</kbd> |
| 60 / 40 (two panes, the first wider) | <kbd>⌃</kbd> <kbd>⌥</kbd> <kbd>2</kbd> |
| Stacked (two panes, one above the other) | <kbd>⌃</kbd> <kbd>⌥</kbd> <kbd>3</kbd> |
| Three columns | <kbd>⌃</kbd> <kbd>⌥</kbd> <kbd>4</kbd> |
| Main + two (one main pane, two stacked beside it) | <kbd>⌃</kbd> <kbd>⌥</kbd> <kbd>5</kbd> |
| 2 × 2 (four panes) | <kbd>⌃</kbd> <kbd>⌥</kbd> <kbd>6</kbd> |

A layout rearranges the panes you already have, so each one works only with that many panes open. No keys by default: **Tag manager**, **Property manager** and **Help**.

## Reader

These work while a book is open in the [e-reader](https://terramd.io/docs/read-in-the-e-reader) and the page has focus. Click the page first.

| Action | Shortcut |
| --- | --- |
| Previous page | <kbd>←</kbd> or <kbd>Page Up</kbd> or <kbd>⇧</kbd> <kbd>Space</kbd> |
| Next page | <kbd>→</kbd> or <kbd>Page Down</kbd> or <kbd>Space</kbd> |
| Previous chapter | <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>←</kbd> or <kbd>⌘</kbd> <kbd>Page Up</kbd> |
| Next chapter | <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>→</kbd> or <kbd>⌘</kbd> <kbd>Page Down</kbd> |
| Beginning of book | <kbd>⌘</kbd> <kbd>Home</kbd> |
| End of book | <kbd>⌘</kbd> <kbd>End</kbd> |
| Back (to where you were reading) | <kbd>⌘</kbd> <kbd>⌫</kbd> |
| Forward | <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>⌫</kbd> |
| Bookmark page | <kbd>⌘</kbd> <kbd>B</kbd> |
| Named bookmark | <kbd>⌥</kbd> <kbd>⇧</kbd> <kbd>B</kbd> |
| Highlight with note | <kbd>⌥</kbd> <kbd>⇧</kbd> <kbd>A</kbd> |
| Quick highlight | <kbd>⌥</kbd> <kbd>⇧</kbd> <kbd>Q</kbd> |
| Annotations in margin | <kbd>⌥</kbd> <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>Z</kbd> |
| Go to page | <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>P</kbd> |
| Zoom in | <kbd>⌘</kbd> <kbd>9</kbd> |
| Zoom out | <kbd>⌘</kbd> <kbd>8</kbd> |
| Fit page | <kbd>⌘</kbd> <kbd>0</kbd> |

Zoom in, Zoom out and Fit page apply to fixed-layout books, whose pages are laid out like a PDF. Go to page needs a book that lists its print pages.

## Keys in notes, code, sheets and the sidebar

Settings › Hotkeys lists these too, as a reference. They belong to the part of the window you're working in, so you can't change them.

### Undo

| Action | Shortcut |
| --- | --- |
| Undo | <kbd>⌘</kbd> <kbd>Z</kbd> |
| Redo | <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>Z</kbd> |

Outside a text field, <kbd>⌘</kbd> <kbd>Z</kbd> also brings back the last note you moved to the Trash.

### Text

While you're writing in a note:

| Action | Shortcut |
| --- | --- |
| Bold (with text selected) | <kbd>⌘</kbd> <kbd>B</kbd> |
| Italic | <kbd>⌘</kbd> <kbd>I</kbd> |
| Underline, while you edit only: Markdown has no underline, so it isn't saved to the file | <kbd>⌘</kbd> <kbd>U</kbd> |
| Strikethrough | <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>S</kbd> |
| Inline code | <kbd>⌘</kbd> <kbd>E</kbd> |
| Add a link (with text selected) | <kbd>⌘</kbd> <kbd>K</kbd> |
| Turn into… (choose a new block type) | <kbd>⌘</kbd> <kbd>/</kbd> |
| Turn into text | <kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>0</kbd> |
| Turn into heading 1 | <kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>1</kbd> |
| Turn into heading 2 | <kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>2</kbd> |
| Turn into heading 3 | <kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>3</kbd> |
| Turn into to-do | <kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>4</kbd> |
| Turn into bulleted list | <kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>5</kbd> |
| Turn into numbered list | <kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>6</kbd> |
| Turn into toggle (a block you can fold) | <kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>7</kbd> |
| Turn into code | <kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>8</kbd> |
| Turn into page (move the block to a new note, and link to it) | <kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>9</kbd> |
| Indent a list item or to-do | <kbd>Tab</kbd> |
| Outdent a list item or to-do | <kbd>⇧</kbd> <kbd>Tab</kbd> |
| Move block up | <kbd>⌥</kbd> <kbd>↑</kbd> |
| Move block down | <kbd>⌥</kbd> <kbd>↓</kbd> |
| Duplicate block up | <kbd>⌥</kbd> <kbd>⇧</kbd> <kbd>↑</kbd> |
| Duplicate block down | <kbd>⌥</kbd> <kbd>⇧</kbd> <kbd>↓</kbd> |
| Duplicate block | <kbd>⌘</kbd> <kbd>D</kbd> |
| Delete block | <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>K</kbd> |
| Check a to-do, or open or close a toggle | <kbd>⌘</kbd> <kbd>Return</kbd> |
| Expand or collapse all toggles | <kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>T</kbd> |
| Select the current block | <kbd>Esc</kbd> |
| Show or hide the outline beside the note | <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>O</kbd> |

### Code

With the cursor in a code block:

| Action | Shortcut |
| --- | --- |
| Comment line | <kbd>⌘</kbd> <kbd>/</kbd> |
| Indent line | <kbd>⌘</kbd> <kbd>]</kbd> |
| Outdent line | <kbd>⌘</kbd> <kbd>[</kbd> |
| Select line | <kbd>⌘</kbd> <kbd>L</kbd> |
| Select next match | <kbd>⌘</kbd> <kbd>D</kbd> |
| Move line up | <kbd>⌥</kbd> <kbd>↑</kbd> |
| Move line down | <kbd>⌥</kbd> <kbd>↓</kbd> |
| Delete line | <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>K</kbd> |
| Toggle line numbers | <kbd>⌘</kbd> <kbd>;</kbd> |
| Format (needs a formatter installed on your Mac) | <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>I</kbd> |
| Convert code block to text | <kbd>⌘</kbd> <kbd>E</kbd> |

### Sheets and databases

In a sheet, with several cells selected:

| Action | Shortcut |
| --- | --- |
| Fill down | <kbd>⌘</kbd> <kbd>D</kbd> |
| Fill right | <kbd>⌘</kbd> <kbd>R</kbd> |

### Peek

While a note is open in a peek:

| Action | Shortcut |
| --- | --- |
| Previous row of the list it came from | <kbd>⌃</kbd> <kbd>⇧</kbd> <kbd>K</kbd> |
| Next row | <kbd>⌃</kbd> <kbd>⇧</kbd> <kbd>J</kbd> |

### Sidebar

With a folder selected in the sidebar:

| Action | Shortcut |
| --- | --- |
| Rename | <kbd>F2</kbd> |
| New folder | <kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>N</kbd> |
| Copy absolute path | <kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>C</kbd> |
| Copy relative path (from the Library folder) | <kbd>⌥</kbd> <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>C</kbd> |
| Reveal in Finder | <kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>R</kbd> |
| Move to Trash | <kbd>⌘</kbd> <kbd>⌫</kbd> |

## More keys

A few keys aren't in Settings at all:

| Action | Shortcut |
| --- | --- |
| Flip a split between side by side and stacked | <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>&#92;</kbd> |
| Open a note in a new tab | <kbd>⌘</kbd>-click it in any list |
| Restore a maximized pane, close a peek, or close a menu or dialog | <kbd>Esc</kbd> |
| Nest or un-nest the selected blocks | <kbd>⌥</kbd> <kbd>⇧</kbd> <kbd>→</kbd> or <kbd>⌥</kbd> <kbd>⇧</kbd> <kbd>←</kbd> |
| Back and forward | swipe left or right with two fingers, or use your mouse's back and forward buttons |
| Move a toolbar button earlier or later, while customizing the toolbar | <kbd>⌥</kbd> <kbd>←</kbd> or <kbd>⌥</kbd> <kbd>→</kbd> |
| Hide a toolbar button, while customizing the toolbar | <kbd>⌫</kbd> |

## Markdown as you type

In a note, typing Markdown marks formats the text straight away. A few of the most used:

| Type | To get |
| --- | --- |
| `#` to `######`, then a space, at the start of a line | Heading 1 to 6 |
| `-` or `*`, then a space | Bullet list |
| `1.`, then a space | Numbered list |
| `[ ]`, then a space | To-do |
| `>`, then a space | Quote |
| ```` ``` ```` (with an optional language, such as ```` ```python ````), then a space | Code block |
| `---` | Divider |
| `**bold**`, `*italic*`, `~~struck~~`, `` `code` ``, `==highlighted==` | Bold, italic, strikethrough, inline code, highlight |
| `/` | The menu of blocks to insert |
| `@` | A menu to link a note or cite a source; on a to-do line, to add a date too |

[Basic formatting syntax](https://terramd.io/docs/formatting-syntax) shows each one with what it saves in the file, and [Advanced formatting](https://terramd.io/docs/advanced-formatting) covers tables, math and the rest.

## Change a shortcut

You can give any command in the Global, Navigation, Panes and tabs, Editor, Other and Reader groups new keys, including commands that have none.

1. Press <kbd>⌘</kbd> <kbd>,</kbd> to open **Settings**, then click **Hotkeys**. (**Help › Keyboard Shortcuts** goes straight there.)
2. Click the keys beside a command. They change to **Press keys…**.
3. Press the new keys. To back out, press <kbd>Esc</kbd>.

   ![Two rows of Settings, Hotkeys. Go to file now shows Command T, with Reset to default and Unbind buttons beside it. Settings shows Press keys….](https://terramd.io/docs/shots/start-hotkeys-rebind.webp "Go to file has been changed to ⌘T. Settings is waiting for new keys.")

To undo a change, hover over the command and click **Reset to default** (the curved arrow). To remove a shortcut without replacing it, hover and click **Unbind** (**×**).

Good to know:

- New keys replace all of a command's shortcuts. Command palette has two by default, <kbd>⌘</kbd> <kbd>K</kbd> and <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>P</kbd>; after a change it has only the one you pressed. **Reset to default** brings both back.
- Terra doesn't warn you when two commands share the same keys, and only one of them will run. Check the list for the keys before you use them.
- Shortcuts belong to the Library that's open, so each Library can have its own.
- The menu bar keeps showing the default keys, and its items still respond to them.
- A shortcut without <kbd>⌘</kbd> or <kbd>⌃</kbd> doesn't fire while you're typing in a note or a text field.

## Related

- [Make Terra yours](https://terramd.io/docs/make-terra-yours): the toolbar, themes and the rest of Settings.
- [Find your way around](https://terramd.io/docs/find-your-way-around): what each pane, panel and drawer is.
- [Basic formatting syntax](https://terramd.io/docs/formatting-syntax): what to type for each kind of formatting.
- [Search syntax](https://terramd.io/docs/search-syntax): what you can type in the search window.
