# Keyboard shortcuts

Every key the editor and the app answer to, grouped by what you are doing, with the Mac form where it differs.

The keys work on the web, and on an iPad or an Android device with a hardware keyboard. The editor takes `Ctrl` or `Cmd` for its shortcuts on every system, so on a Mac `Cmd+B` and `Ctrl+B` both make words bold. Where a table has a macOS column, it gives the form a Mac keyboard reaches for.

## Formatting

| Keys | On macOS | What they do |
| --- | --- | --- |
| `Ctrl+B` | `Cmd+B` | Bold |
| `Ctrl+I` | `Cmd+I` | Italic |
| `Ctrl+U` | `Cmd+U` | Underline |
| `Ctrl+Shift+S` | `Cmd+Shift+S` | Strikethrough |
| `Ctrl+E` | `Cmd+E` | Inline code |
| `Ctrl` and a click on a link | `Cmd` and a click | Opens the link in a new tab, on the web |

Each mark goes on over the selection, or comes off when the whole selection already has it. A link has no key: **Link** in the selection menu adds one ([Writing and formatting](/docs/writing/)).

## Blocks

| Keys | On macOS | What they do |
| --- | --- | --- |
| `Ctrl+0` | `Cmd+0` | Text (a paragraph) |
| `Ctrl+1`, `Ctrl+2`, `Ctrl+3` | `Cmd+1`, `Cmd+2`, `Cmd+3` | Heading 1, 2 or 3 |
| `Ctrl+Shift+L` | `Cmd+Shift+L` | A list: bulleted, unless the block is a list already |
| `Ctrl+Shift+Q` | `Ctrl+Shift+Q` | Quote. On a Mac `Cmd+Shift+Q` is the system's Log Out, so use `Ctrl` |
| `Ctrl+Shift+K` | `Cmd+Shift+K` | Code block |
| `/` | `/` | The slash menu, at the start of a block or after a space |

### Typed at the start of a paragraph

| Type | And you get |
| --- | --- |
| `#`, `##` or `###`, then a space | Heading 1, 2 or 3 |
| `-` or `*`, then a space | A bulleted list |
| `1.`, then a space | A numbered list |
| `[]` or `[ ]`, then a space | A to-do list |
| `>`, then a space | A quote |
| ```` ``` ````, with a language name if you want one, then a space or `Enter` | A code block |

### Lists and paragraphs

| Keys | What they do |
| --- | --- |
| `Enter` | A new block. A list goes on, an empty list item ends the list, and a paragraph follows a heading |
| `Shift+Enter` | A line break inside the block |
| `Tab`, `Shift+Tab` | Indent or outdent a list item or a quote |
| `Backspace` at the start of a block | Outdents an indented list item, turns any other kind of block into a paragraph, or joins a paragraph onto the block above |
| `Delete` at the end of a block | Joins the next block onto this one |
| `Down` at the very end of the document | Starts a new line, as `Enter` does |

### The slash menu

| Keys | What they do |
| --- | --- |
| `Up`, `Down` | Move through the menu |
| `Enter`, `Tab` | Pick the highlighted entry |
| `Escape` | Close the menu |
| `Backspace` | Take back a letter of the filter, and close the menu when none is left |
| `/` straight after the first | Type a slash |

## Moving and selecting

| Keys | On macOS | What they do |
| --- | --- | --- |
| Arrow keys | Arrow keys | Move by character, and by line |
| `Ctrl+Left`, `Ctrl+Right` | `Cmd+Left`, `Cmd+Right` | Move by word |
| `Ctrl+Up`, `Ctrl+Down` | `Cmd+Up`, `Cmd+Down` | Go to the start or the end of the block |
| `Home`, `End` | `Fn+Left`, `Fn+Right` | Go to the start or the end of the line |
| `Ctrl+Home`, `Ctrl+End` | `Cmd+Fn+Left`, `Cmd+Fn+Right` | Go to the start or the end of the document |
| `Page Up`, `Page Down` | `Fn+Up`, `Fn+Down` | Go a page up or down |
| `Shift` with any of these | `Shift` with any of these | Stretch the selection |
| `Ctrl+A` | `Cmd+A` | Select all. In a code block, the block's code first |
| `Escape` | `Escape` | Shrink the selection to the caret |

With the mouse:

| Mouse | What it does |
| --- | --- |
| Double click | Selects a word |
| Triple click | Selects the block |
| `Shift` and a click | Stretches the selection to the click |
| A drag that starts inside the selection | Moves the selected words |
| Middle button | Scrolls the page with the pointer until the next click, on the web |
| Right click | Opens the context menu, on the web |

## Editing

| Keys | On macOS | What they do |
| --- | --- | --- |
| `Ctrl+Z` | `Cmd+Z` | Undo your own last edit |
| `Ctrl+Shift+Z`, `Ctrl+Y` | `Cmd+Shift+Z`, `Cmd+Y` | Redo |
| `Ctrl+X`, `Ctrl+C`, `Ctrl+V` | `Cmd+X`, `Cmd+C`, `Cmd+V` | Cut, copy, paste |
| `Ctrl+Backspace` | `Cmd+Backspace` | Delete the word before the caret |
| `Ctrl+Delete` | `Cmd+Delete` | Delete the word after the caret |
| `Backspace` or `Delete` beside a chip | The same | Remove the whole chip |
| `Backspace` at the start of a paragraph after an image, a divider, a table or a drawing | The same | Select that block; a second press removes it |

On a Mac keyboard, the key marked Delete is `Backspace` here, and `Fn` with it is `Delete`.

## Code blocks

| Keys | On macOS | What they do |
| --- | --- | --- |
| `Enter` | `Enter` | A new line in the block |
| `Ctrl+Enter` | `Cmd+Enter` | Split the block at the caret. At its end, an empty code block starts below, and `Ctrl+0` makes it a paragraph |
| `Tab` | `Tab` | Type a tab |
| `Ctrl+A` | `Cmd+A` | Select the block's code, then the whole document |

[Diagrams, math and code](/docs/diagrams/) covers code blocks, diagrams and formulas.

## Tables

| Keys | What they do |
| --- | --- |
| `Tab` | The next cell. From the last cell, a new row |
| `Shift+Tab` | The previous cell |
| `Enter` | The cell below. From the last row, a new row |
| `Shift+Enter` | A line break in the cell |
| Arrow keys | Move across cells, and out of the table at its edges |
| `Escape` | Close a row, column or cell menu, or a chip's picker, on the web |

[Tables](/docs/tables/) has the rest.

## Drawings

| Keys | What they do |
| --- | --- |
| `Escape` | Put the drawing tool down |
| `Shift` while drawing | The pen draws a straight segment, a line or an arrow snaps to horizontal, vertical or diagonal, and the other shapes keep a square box |
| `Enter`, with the text tool | Place the line and start the next one under it. On an empty line, stop typing |
| `Escape`, with the text tool | Place the words and put the tool down |
| `Enter`, placing a pasted picture | Lock it in |
| `Escape`, placing a pasted picture | Lock it in and put the tool down |
| `Backspace` or `Delete`, placing a pasted picture | Remove it |
| `Shift` while resizing or rotating a pasted picture | Keep its proportions, or turn it in steps of 15 degrees |

[Images and drawings](/docs/drawings/) has the tools.

## Find, the assistant and the app

| Keys | What they do |
| --- | --- |
| `Ctrl+F` (`Cmd+F` on macOS) | Open **Find in document** in the status bar ([Find](/docs/find/)) |
| `Enter` in the find field | Go to the next match |
| `Shift+Enter` in the find field | Go to the previous match |
| `Escape` in the find field | Close the find and clear its highlights |
| `Enter` in the assistant's field | Send the prompt ([The assistant](/docs/assistant/)) |
| `Escape` in the assistant's field | Close the assistant |
| `Enter` in a sheet's field | Confirm it, as its check button does |
| `Escape` | Close an open menu, on the web |

:::note
A browser can keep a few key combinations for itself before the page sees them. Every formatting and block command on this page is also in a menu: the selection menu, the slash menu or a block's grip.
:::
