跳到正文
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.

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

Action Mac Windows and Linux What it does
Find action Cmd+Alt+, Ctrl+Alt+, Opens the searchable list of every action of the editor, the same as the … button in the toolbar.
Sidebar Cmd+Alt+' Ctrl+Alt+' Shows or hides the sidebar of the editor.
AI chat Cmd+Alt+\ Ctrl+Alt+\ Opens the Chat tab of the sidebar, or returns to the tab you had before. Only there while the AI chat is on. See AI chat.
Focus canvas Cmd+Alt+Shift+M Ctrl+Alt+Shift+M Hides the sidebar of the editor and shows only the canvas. Press it again to bring the sidebar back. It is in the More menu, not on the toolbar, and it is never saved: a new window shows the sidebar as you left it.
Trace paths Cmd+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+C Ctrl+Shift+C Opens 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.

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.

Key What it does
Cmd+Z / Ctrl+Z Undo.
Cmd+Y, Cmd+Shift+Y or Cmd+Shift+Z, and the same with Ctrl Redo.
Cmd+X, C, V / Ctrl+X, C, V Cut, copy and paste the selection.
Cmd+D / Ctrl+D Duplicate the selection.
Backspace or Delete Delete the selection.
Cmd+A / Ctrl+A Select all elements.
Cmd+F / Ctrl+F Find in the diagram.
Cmd+= and Cmd+- / Ctrl+= and Ctrl+- Zoom in and out.
Cmd+0 / Ctrl+0 Fit the diagram in the canvas. This and the Fit diagram action are the only things that re-fit the view after it first opens.
Cmd+arrow / Ctrl+arrow Pan the canvas.
Arrow Move the selection.
S, L, H, C Space tool, lasso select, hand tool, connect. In a decision requirements diagram only the lasso and the hand are there.
E and R Edit a label, and replace an element (R in a process only).
Tab and Esc Accept and dismiss a suggestion: the ghost element drawn beside a dead end, or the ghost text after the caret in a field of the properties panel. In a field, Alt+Shift+E explains it. Both can be switched off in Settings | Tools | Penstock.
Esc Ends a trace of paths, and folds the AI chat card without stopping the agent.
Key What it does
Cmd+click / Ctrl+click on a string or a comment Go 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 share Rename it in both. Pro. See Rename in the IDE.
The IDE's own shortcut for Find Usages In the tool window, on a node: find the code that names it.
The IDE's own shortcut for Go to Implementation In the tool window, on a worker: open its implementation.
The IDE's own shortcut for Copy In the tool window: copy the id of the node.
Enter or double-click Open the selected node of the tool window.

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

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

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