Penstock

JetBrains / Using it

Shortcuts in JetBrains

The keys that work in the Penstock editor and in your code inside a JetBrains IDE, with the default of each, and how to bind your own.

Free

Cmd is the key on a Mac, and Ctrl is the key on Windows and Linux. Alt is Option on a Mac.

Keys Penstock adds to the IDE's keymap

Four actions have a default key. They are IDE actions, so you can change them in Settings | Keymap, under Tools | Penstock. They work while a Penstock editor has the focus, and there they come before the IDE's own actions that use the same keys.

ActionMacWindows and LinuxWhat it does
Find actionCmd+Alt+,Ctrl+Alt+,Opens the searchable list of every action of the editor, the same as the … button in the toolbar.
SidebarCmd+Alt+'Ctrl+Alt+'Shows or hides the sidebar.
Trace pathsCmd+Shift+;Ctrl+Shift+;Traces the paths through the selected step. Press it again, press Esc or click the empty canvas to end it. See Trace paths.
Export…Cmd+Shift+CCtrl+Shift+COpens the export dialog: save the diagram as SVG, PNG or PDF, or copy it as a picture. See Export.

Every other action of the editor is in the keymap without a key. Look for it under Tools | Penstock, in one of seven groups: Check & run, Layout & convert, Deploy & share, View, File, Edit and Help. The same actions are in Find Action. To bind one, search the keymap for its name and add a shortcut.

In the diagram editor

These are keys of the editor itself. The list is for a process. The decision diagram has fewer, and the form editor has only undo and redo. The IDE does not know them, so they cannot be changed in the keymap. The editor's own Keyboard shortcuts sheet lists every one for the editor you have open, with a search field. Open it with ?, or from Find action.

KeyWhat it does
Cmd+Z / Ctrl+ZUndo.
Cmd+Y, Cmd+Shift+Y or Cmd+Shift+Z, and the same with CtrlRedo.
Cmd+X, C, V / Ctrl+X, C, VCut, copy and paste the selection.
Cmd+D / Ctrl+DDuplicate the selection.
Backspace or DeleteDelete the selection.
Cmd+A / Ctrl+ASelect all elements.
Cmd+F / Ctrl+FFind in the diagram.
Cmd+= and Cmd+- / Ctrl+= and Ctrl+-Zoom in and out.
Cmd+0 / Ctrl+0Fit the diagram in the canvas.
Cmd+arrow / Ctrl+arrowPan the canvas.
ArrowMove the selection.
S, L, H, CSpace tool, lasso select, hand tool, connect. In a decision requirements diagram only the lasso and the hand are there.
E and REdit a label, and replace an element (R in a process only).
EscEnds a trace of paths.

In your code and in the tool window

KeyWhat it does
Cmd+click / Ctrl+click on a string or a commentGo to the diagram element it names. Same as Go to Declaration. Pro. See Code links in the IDE.
Shift+F6 on a name that diagrams and code shareRename it in both. Pro. See Rename in the IDE.
The IDE's own shortcut for Find UsagesIn the tool window, on a node: find the code that names it.
The IDE's own shortcut for Go to ImplementationIn the tool window, on a worker: open its implementation.
The IDE's own shortcut for CopyIn the tool window: copy the id of the node.
Enter or double-clickOpen the selected node of the tool window.

The IDE's own shortcuts depend on the keymap you chose. Look them up in Settings | Keymap.

What you see

The keys show next to their entries in the editor's toolbar tooltips, in the Find action list and in the Keyboard shortcuts sheet. In the IDE, the keymap shows the same four.

Common problems

A key does nothing in the diagram.
The canvas must have focus. Click an empty spot on it. During a token simulation, keys that edit the diagram are switched off.
A Penstock key does nothing outside the editor.
The four actions are active only while a Penstock editor has the focus. In another tab the IDE's own action with that key runs.
Cmd/Ctrl+click does nothing on a string.
Code links need Pro, and the string must be a name a diagram uses.
Cmd/Ctrl+Shift+C does not copy a picture.
It opens the export dialog. Copying the diagram as a picture is a choice in that dialog.