Skip to content
Limited Time 30% off Mermaid Studio — Get discount →

Keyboard Shortcuts

Last updated:

This page lists keyboard shortcuts and mouse interactions available in the Mermaid Studio diagram preview. Shortcuts follow standard JetBrains conventions and can be customized in Settings > Keymap (search for “Mermaid”).

  • Command + 0 Control + 0 fits the diagram to the viewport (capped at 100%)
  • Command + Shift + 0 Control + Shift + 0 sets zoom to exactly 100%
  • Command + Plus Sign Control + Plus Sign or Command + Equal Sign Control + Equal Sign zooms in
  • Command + Minus Sign Control + Minus Sign zooms out
  • Arrow keys pan the diagram by 50 pixels per press
  • Command Control + scroll wheel performs focal zoom (toward cursor)
  • Scroll wheel zooms in and out
  • Middle-click drag pans the diagram

The fit / actual-size shortcuts work from either the source editor or the preview pane, so you don’t need to focus the preview before resetting the view. Zoom in / out require the platform-native modifier so they don’t interfere with typing while an inline label edit is open.

Edit mode features require a paid license (Core or Studio) and are currently available for Flowchart diagrams only.

  • Click an element to select it
  • Shift+Click to add or remove an element from the selection
  • Click+Drag on an empty area to marquee-select multiple elements
  • Command + A Control + A selects all elements
  • Alt + Shift + P Alt + Shift + P selects the parent subgraph
  • Alt + Shift + C Alt + Shift + C selects all children of the current subgraph
  • Alt + Shift + S Alt + Shift + S selects all siblings at the same level
  • Double-click a label to edit it inline
  • Command + B Control + B toggles bold on the selected element’s label (works with multi-selection)
  • Command + I Control + I toggles italic on the selected element’s label (works with multi-selection)
  • Command + G Control + G groups selected elements into a new subgraph
  • Delete removes the selected element or elements
  • Command + Z Control + Z undoes the last edit mode operation

In preview mode, clicking an element triggers built-in Mermaid.js interactivity (actor menus, external links, etc.). Hold Command Control and click to navigate to the element’s source declaration instead.

In edit mode, a plain click navigates to the element’s source declaration. Hold Command Control and click to trigger Mermaid.js interactivity.

  • Command + F Control + F opens the search bar in the diagram preview
  • Control + Command + Up Arrow Control + Alt + Up Arrow navigates between a link and its linkStyle declaration (Go to Related)