# The command menu

Press `⌘K` or `⌘P` to go anywhere, find any words, or do anything.

One box finds a page, an entity, a day or a block, and acts on the block you are in. On Windows, press `Ctrl+K` or `Ctrl+P`.

## Open it

- `⌘K` or `⌘P`, anywhere. Press it again to close.
- **Search** at the top of the sidebar.
- On a phone: tap **Search** in the bottom bar or in the sidebar, or tap the screen with two fingers. See [Search on a phone](phones.md#omnibar).

> **Note:** with words selected in a block, `⌘K` links them instead (as in Notion). `⌘P` always opens the menu.

## Find a page, an entity, a day or a block

![The command menu, empty: the search box, the pages opened today, then Actions such as New page, Quick capture and Go to today; a preview of the first page at the right, and the keys at the foot](img/palette.webp)
*The command menu, empty.*

- Empty, the menu shows the pages you opened lately, under **Today**, **Past week**, **Past 30 days** and **Earlier**, then actions.
- Type, and the results show as you type, in sections: days, pages, entities, blocks (the blocks whose words hold what you typed), and actions. Each section says how many it found. The section with the best match comes first.
- In a section, the best match comes first: the name itself, then names that start with what you typed, then names with a word that starts with it, then names that hold it anywhere, then entities whose tag's name matches. The link (`[[` and `@`), Move to and field pickers use the same order.
- An entity is also found by its fields: words in a Text, Web link or Email field, and the name a Select, Multi-select, Select from tag or Select from query field shows. Its row names the field, such as “Author · Ursula K. Le Guin”, with your words marked.
- Every page and entity whose name holds your words is found, however old it is. A long block shows from the word before your words.
- Click a section's heading, or press `Tab`, to see only that section. *Show all* brings the rest back.
- Type a day: `today`, `tomorrow`, `fri`, `oct 15`. It reads the same words as [dates in blocks](dates.md).

![The command menu with “fri” typed: one day, Friday, October 16, under Days, with “only days” beside the heading, and its preview: nothing written on this day yet](img/palette-fri.webp)
*Days read the same words as dates in blocks.*

- Beside the results, a preview shows the one you are on: where it is, who edited it and when, and its blocks, with your words marked.

### Filters

Click the filter button at the end of the box. Each filter you pick shows in the box as a small chip, with **×** to take it off.

| Filter | Shows | Or type |
| --- | --- | --- |
| **Kind** | One section only: pages, entities, days, blocks or actions |  |
| **Tag** | Blocks and entities with any of the tags you pick | `#task` |
| **In** | A page, and what is under it | `in:` |
| **When** | Edited Today, in the Past week, Past 30 days or This year. *Made, not edited* goes by when it was made. | `after:` `before:` |
| **Who wrote it** | What a person or an agent last edited, or made | `by:` |
| **Has a field** | Entities with a value in that field | `has:` |
| **Title only** | Pages, entities and days, no blocks |  |

*Clear all* takes every filter off.

## Actions

Type `>` first to see only actions. When the caret is in a block, or blocks are selected, the first actions work on them:

- **Turn into** each kind, with its `⌘⌥` key
- **Tag…** (`#`), when blocks are selected: puts a tag on all of them, or takes one off them
- **Move to…** another page (`⌘⇧M`)
- **Duplicate** (`⌘D`)
- **Open as a page**
- **Copy link**, to the block
- **Delete the block**, or **Delete the blocks**

Then, always:

- **Open or close every block on this page** (`⌘⌥↓` opens them, `⌘⌥↑` closes them)
- **New page** (`⌃⌥N`)
- **Quick capture**: write something down and send it to a day or a page. See [Quick capture](getting-started.md#quick-capture).
- **Go to today** (`⌃⇧D` on a Mac)
- **Calendar**
- **Op Log: every change, undo**
- **Report a problem**
- **Customize sidebar**. See [Customize the sidebar](settings.md#customize).
- **Getting started**: brings back the checklist of first steps on today's page.
- **Trash**
- **Make the sidebar small**, **Hide the sidebar** or **Show the sidebar** (`⌘\`)
- **New tab** (`⌃⌥T`)
- **Show the right panel** or **Hide the right panel** (`⌘⌥\`), on a page
- **Show who wrote what** or **Hide who wrote what**
- **Turn off themes and snippets**, while a theme or a snippet is on, and **Turn themes and snippets back on** after. See [Themes and snippets](settings.md#themes).
- **Sign in**, when you are not signed in. It opens the same sign-in as **Settings**, **Account**. See [If you already have an account](getting-started.md#sign-in).

Type part of an action's name to find it: `move`, `head`, `trash`, `sign in`. An action whose name starts with the words you typed comes before a page that matches as well.

On a phone, **New page**, **Add to today**, **Go to today**, **Undo**, **Redo** and **Settings** come first.

## Keys in the menu

- `↑` `↓` move through the rows.
- `Enter` opens the row, or runs it. `⌘Enter` opens it in a new tab.
- `Tab` steps to the next section.
- `⌘L` copies a link to the row.
- `Esc`, or a click outside, closes the menu and puts the caret back where it was.
