> ## Documentation Index
> Fetch the complete documentation index at: https://docs.primo.build/llms.txt
> Use this file to discover all available pages before exploring further.

# Keyboard Shortcuts

> Speed up your workflow with keyboard shortcuts for common actions.

Primo's keyboard shortcuts are built around the modifier key (⌘ on Mac, Ctrl on Windows/Linux). When you hold the modifier key, relevant UI elements appear showing you what other keys to press.

> [!NOTE]
>
> Throughout this page, we use ⌘ to represent Cmd on Mac or Ctrl on Windows/Linux.

## Global Shortcuts

These shortcuts work anywhere in Primo, **except when a dialog is open**:

| Shortcut | Action |
| - | - |
| ⌘P | Open publish dialog (press again to publish) |
| ⌘↑ | Navigate to previous page (same level) |
| ⌘↓ | Navigate to next page (same level) |

> [!TIP]
>
> ⌘P is your quickest way to publish. Press once to open the dialog, press again to confirm and publish.

## Page View Shortcuts

While viewing a page in the editor:

| Shortcut | Action |
| - | - |
| ⌘E | Open section dialog (when hovering over a block) |

## Section & Block Editor Dialog

While editing a section or block in the dialog:

| Shortcut | Action |
| - | - |
| ⌘S | Save changes |
| ⌘E | Toggle between Code and Content tabs |
| Esc | Close dialog |

**Code Editor** (when in the Code tab):

| Shortcut | Action |
| - | - |
| ⌘R | Refresh the block preview |
| ⌘Enter | Format code |

The current block editor uses one Svelte code pane. Shortcuts for switching between separate HTML, CSS, and JavaScript panes do not apply.

> [!NOTE]
>
> Primo uses CodeMirror for code editing. Some standard code editor shortcuts may work, but they're not guaranteed.

## Site Editor Dialog

While editing site configuration:

| Shortcut | Action |
| - | - |
| ⌘S | Save changes |

## Tips for Efficiency

> [accordion] Hold the modifier key to see available shortcuts
>
> When you hold ⌘/Ctrl, Primo shows you contextual hints for what shortcuts are available in your current view.

> [accordion] Refresh the code preview with ⌘R
>
> While the block code editor has focus, press ⌘R to refresh its preview.

> [accordion] Use ⌘E to bounce between code and content
>
> When editing blocks, quickly switch between writing code and previewing content without reaching for the mouse.

> [accordion] Publish often with ⌘P
>
> Make it a habit to publish frequently. Press once to open the dialog, press again to publish. Quick iterations help catch issues early.

> [accordion] Navigate pages with arrow keys
>
> When managing many pages, use ⌘↑/↓ to move through them quickly.

## Next Steps

> [card] [Publishing](https://docs.primo.build/content-management/publishing.md)
>
> Learn about the publishing workflow

> [card] [Using the Editor](https://docs.primo.build/content-management/using-the-editor.md)
>
> Master the page editor interface


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.