Keyboard shortcuts
Pywr shortcuts
Section titled “Pywr shortcuts”These work while a model is open. They are chords: press the first keys together, release them, then press the last key.
| Shortcut | Command |
|---|---|
| Ctrl Alt P then S | Open the schematic of the active model |
| Ctrl Alt P then R | Run the model |
| Ctrl Alt P then Shift R | Run the model with options |
| Ctrl Alt P then A | Add a component |
The keys are the same on Windows, Linux and macOS. On a Mac keyboard, Alt is the Option key.
Editor shortcuts that work on a model
Section titled “Editor shortcuts that work on a model”These are shortcuts of VS Code. In the JSON file of a model, they act on the components of the model. On macOS, use Cmd where the table says Ctrl.
| Shortcut | What it does in a model |
|---|---|
| F2 | Rename the component under the cursor, everywhere it is used |
| F12 | Go to the component a name refers to |
| Shift F12 | List where a component is used |
| Ctrl Space | Complete a component name or a type |
| Ctrl . | Open the fixes for the mistake under the cursor |
| Ctrl Shift O | Find a component of the file by name |
On the schematic
Section titled “On the schematic”| Key | What it does |
|---|---|
| Delete or Backspace | Delete the selected nodes and edges, after a confirmation |
| Esc | Leave connecting mode |
Change a shortcut
Section titled “Change a shortcut”Open File > Preferences > Keyboard Shortcuts (Code > Settings > Keyboard Shortcuts on macOS), search for Pywr, and double-click a command to give it other keys.