> ## 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.

<Info>
  Throughout this page, we use ⌘ to represent Cmd on Mac or Ctrl on Windows/Linux.
</Info>

## 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.
</Tip>

## 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                    |
| -------- | ------------------------- |
| ⌘1       | Switch to HTML pane       |
| ⌘2       | Switch to CSS pane        |
| ⌘3       | Switch to JavaScript pane |
| ⌘Enter   | Format active code pane   |

<Info>
  Primo uses CodeMirror for code editing. Some standard code editor shortcuts may work, but they're not guaranteed.
</Info>

## Site Editor Dialog

While editing site configuration:

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

## Tips for Efficiency

<AccordionGroup>
  <Accordion title="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>

  <Accordion title="Use ⌘1/2/3 to switch code panes">
    Instead of clicking each pane tab individually, use ⌘1 for HTML, ⌘2 for CSS, and ⌘3 for JavaScript. This makes editing much faster.
  </Accordion>

  <Accordion title="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>

  <Accordion title="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>

  <Accordion title="Navigate pages with arrow keys">
    When managing many pages, use ⌘↑/↓ to move through them quickly.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Publishing" icon="upload" href="/content-management/publishing">
    Learn about the publishing workflow
  </Card>

  <Card title="Using the Editor" icon="pen-to-square" href="/content-management/using-the-editor">
    Master the page editor interface
  </Card>
</CardGroup>
