Skip to content

Keyboard shortcuts

All keyboard shortcuts available in the playground, grouped by where they apply.

On macOS, use Cmd (⌘) wherever Ctrl is shown below. Other modifiers (Alt, Shift) are identical across platforms.

Editor pane

These are the standard Monaco editor shortcuts; they work whenever the editor has focus.

Editing

ShortcutAction
Ctrl + ZUndo
Ctrl + Y or Ctrl + Shift + ZRedo
Ctrl + XCut
Ctrl + CCopy
Ctrl + VPaste
Ctrl + ASelect all
ShortcutAction
Ctrl + HomeGo to start of file
Ctrl + EndGo to end of file
Ctrl + GGo to line (prompts for line number)
Ctrl + ↑ / Ctrl + ↓Scroll without moving cursor
Home / EndStart / end of line
Ctrl + ← / Ctrl + →Previous / next word
Page Up / Page DownScroll one page

Selection

ShortcutAction
Shift + ← / Shift + →Extend selection by character
Shift + ↑ / Shift + ↓Extend selection by line
Ctrl + Shift + ← / Extend selection by word
Ctrl + LSelect current line (press repeatedly to extend)

Multi-cursor

ShortcutAction
Alt + ClickAdd cursor at click position
Ctrl + Alt + ↑ / Add cursor above / below
Ctrl + DAdd next occurrence of current selection as cursor
Ctrl + URemove last added cursor
EscapeCollapse to single cursor

Line operations

ShortcutAction
Alt + ↑ / Alt + ↓Move current line up / down
Shift + Alt + ↑ / Duplicate current line up / down
Ctrl + Shift + KDelete current line
Ctrl + /Toggle single-line comment
Ctrl + Shift + /Toggle block comment
Ctrl + ] / Ctrl + [Indent / outdent

Find and replace

ShortcutAction
Ctrl + FOpen find
Ctrl + HOpen find-and-replace
F3 / Shift + F3Next / previous match
Enter (in find box)Next match
EscapeClose find / replace

Formatting

ShortcutAction
TabInsert tab character or indent selection
Shift + TabOutdent selection

Diagram pane

Currently the diagram pane has no keyboard-only operations. Interactions are mouse-driven: click to select, drag to reposition, scroll-with-Ctrl to zoom. A future release may add arrow-key navigation between entities and keyboard zoom shortcuts.

Global

These work regardless of which pane has focus.

ShortcutAction
Ctrl + + or Ctrl + =Zoom diagram in (when diagram has focus)
Ctrl + -Zoom diagram out (when diagram has focus)
Ctrl + 0Reset diagram zoom to 100% (when diagram has focus)

Note that browser zoom shortcuts (Ctrl + +, Ctrl + -, Ctrl + 0) and the diagram pane's own zoom shortcuts use the same keys. The shortcut applies to whichever has focus. If you mean to zoom the browser, click outside the diagram pane first; if you mean to zoom the diagram, click inside it first.

What's not a shortcut

Some operations that you might expect to have keyboard shortcuts don't (yet):

  • Open the Examples menu: mouse only
  • Open the Share dropdown: mouse only
  • Toggle the inspector pane: mouse only (× button on the inspector header)
  • Switch focus between editor and diagram: use mouse or Tab

If you frequently use one of these, open an issue and we'll prioritize.

What's next

Spec under Apache License 2.0 · Examples under CC0 1.0