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.
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.
| 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. |
| 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.
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.
| 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. |
| 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). |
| Esc | Ends a trace of paths. |
In your code and in the tool window
| 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.
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.