2020-07-03 13:08:14 +03:00
---
layout: developer-doc
title: Shortcuts
category: product
2021-11-05 14:51:43 +03:00
tags: [product, ui]
2020-07-03 13:08:14 +03:00
---
2020-10-20 05:44:35 +03:00
## General Assumptions
2020-10-02 05:16:38 +03:00
2020-10-20 05:44:35 +03:00
#### The <kbd>meta</kbd> key.
2021-11-05 14:51:43 +03:00
2022-10-25 20:21:12 +03:00
The < kbd > cmd< / kbd > key was introduced to make the shortcuts consistent across
2021-11-05 14:51:43 +03:00
platforms. It is defined as < kbd > command< / kbd > on macOS, and as < kbd > ctrl< / kbd >
on Windows and Linux.
2020-10-20 05:44:35 +03:00
#### Keyboard-only Workflow
2021-11-05 14:51:43 +03:00
The GUI and all shortcuts were designed in a way to allow both efficient
mouse-only as well as keyboard-only workflows. In most cases, there is a
relation between mouse and keyboard shortcuts, namely, the `left-mouse-button`
corresponds to `enter` . For example, stepping into a node is done by either
double clicking the node, or just pressing the enter key.
2020-10-20 05:44:35 +03:00
2021-11-05 14:51:43 +03:00
#### Missing / not working shortcuts
2020-10-20 05:44:35 +03:00
2021-11-05 14:51:43 +03:00
Some of the shortcuts presented below are marked with the :warning: icon, which
means, that they are planned, but not yet implemented. Feel free to contribute
and help us implement them!
2020-10-20 05:44:35 +03:00
2021-11-05 14:51:43 +03:00
Shortcuts marked with the :bangbang: icon should work, but are reported to be
broken and require further investigation.
2020-10-20 05:44:35 +03:00
## Graph Editor
#### General Shortcuts
2020-07-11 04:00:26 +03:00
2023-01-17 15:38:25 +03:00
| Shortcut | Action |
| ------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| < kbd > cmd< / kbd > +< kbd > alt< / kbd > +< kbd > shift< / kbd > +< kbd > t< / kbd > | Toggle light/dark application style. Currently doesn't work properly, as the Theme Switcher is not created yet. (https://github.com/enso-org/ide/issues/795) |
| < kbd > ctrl< / kbd > +< kbd > `< / kbd > | Show Code Editor. Please note that the Code Editor implementation is in a very early stage and you should not use it. Even just openning it can cause errors in the IDE. Do not try using the graph editor while having the code editor tab openned. |
| < kbd > cmd< / kbd > +< kbd > o< / kbd > | Open project |
| < kbd > cmd< / kbd > +< kbd > s< / kbd > | Save module |
2023-05-10 11:40:24 +03:00
| < kbd > cmd< / kbd > +< kbd > shift< / kbd > +< kbd > r< / kbd > | Restore module from last save |
2023-01-17 15:38:25 +03:00
| < kbd > cmd< / kbd > +< kbd > z< / kbd > | Undo last action |
| < kbd > cmd< / kbd > +< kbd > y< / kbd > or < kbd > cmd< / kbd > + < kbd > shift< / kbd > + < kbd > z< / kbd > | Redo last undone action |
| < kbd > cmd< / kbd > +< kbd > q< / kbd > | Close the application (MacOS) |
| < kbd > ctrl< / kbd > +< kbd > q< / kbd > | Close the application (Linux) |
| < kbd > alt< / kbd > +< kbd > F4< / kbd > | Close the application (MacOS, Windows, Linux) |
| < kbd > ctrl< / kbd > +< kbd > w< / kbd > | Close the application (Windows, Linux) |
| :warning: < kbd > ctrl< / kbd > +< kbd > p< / kbd > | Toggle profiling mode |
| < kbd > escape< / kbd > | Cancel current action. For example, drop currently dragged connection. |
2023-05-10 11:40:24 +03:00
| < kbd > cmd< / kbd > +< kbd > alt< / kbd > +< kbd > t< / kbd > | Terminate the program execution |
| < kbd > cmd< / kbd > +< kbd > alt< / kbd > +< kbd > r< / kbd > | Re-execute the program |
2023-04-27 20:30:26 +03:00
| < kbd > cmd< / kbd > +< kbd > shift< / kbd > +< kbd > k< / kbd > | Switch the execution environment to Design. |
| < kbd > cmd< / kbd > +< kbd > shift< / kbd > +< kbd > l< / kbd > | Switch the execution environment to Live. |
2023-08-30 16:04:21 +03:00
| < kbd > cmd< / kbd > +< kbd > c< / kbd > | Copy the selected nodes to the clipboard. |
| < kbd > cmd< / kbd > +< kbd > v< / kbd > | Paste a node from the clipboard at the mouse cursor position. |
2020-10-20 05:44:35 +03:00
#### Navigation
2020-07-11 04:00:26 +03:00
2021-11-05 14:51:43 +03:00
| Shortcut | Action |
| ------------------------------------------------ | ------------------------------- |
| Drag gesture (two fingers) | Pan the scene. |
| Pinch gesture (two fingers) | Zoom the scene. |
| < kbd > MMB< / kbd > drag | Pan the scene. |
| < kbd > RMB< / kbd > drag | Zoom the scene. |
| < kbd > LMB< / kbd > double press node name | Step into the node. |
| :warning: < kbd > LMB< / kbd > double press background | Step out of the current node. |
2022-10-25 20:21:12 +03:00
| < kbd > cmd< / kbd > +< kbd > enter< / kbd > | Step in the last selected node. |
2021-11-05 14:51:43 +03:00
| < kbd > alt< / kbd > +< kbd > enter< / kbd > | Step out of the current node. |
2020-06-25 13:54:41 +03:00
2020-10-20 05:44:35 +03:00
#### Node Layout
2020-06-25 13:54:41 +03:00
2021-11-05 14:51:43 +03:00
| Shortcut | Action |
| ------------------------------------------ | ----------------------------------------------------------------- |
| < kbd > LMB< / kbd > drag non-selected node name | Move the node to new position (dragging do not modify selection). |
| < kbd > LMB< / kbd > drag selected node name | Move all selected nodes the node to new positions. |
2020-05-19 15:24:12 +03:00
#### Node Selection
2021-11-05 14:51:43 +03:00
| Shortcut | Action |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| < kbd > LMB< / kbd > click node name | Deselect all nodes. Select the target node. |
| < kbd > LMB< / kbd > click background | Deselect all nodes. |
| :warning: < kbd > LMB< / kbd > drag background | Select nodes using selection-box. |
| < kbd > shift< / kbd > + < kbd > LMB< / kbd > click node name | Add / remove node to the selection group. |
| :warning: < kbd > shift< / kbd > + < kbd > LMB< / kbd > drag background | Add / remove nodes to the selection group. |
| :warning: < kbd > \*-arrow</ kbd > | Select node on the right side of the newest selected node. |
| :warning: < kbd > cmd< / kbd > + < kbd > a< / kbd > | Select all nodes. |
| :warning: < kbd > escape< / kbd > | Deselect all nodes (if not in a mode, like edit mode). |
| < kbd > shift< / kbd > + < kbd > ctrl< / kbd > + < kbd > LMB< / kbd > click node name | Add node to the selection group. |
| :warning: < kbd > shift< / kbd > + < kbd > ctrl< / kbd > + < kbd > LMB< / kbd > drag background | Add nodes to the selection group. |
| < kbd > shift< / kbd > + < kbd > alt< / kbd > + < kbd > LMB< / kbd > click node name | Remove node to the selection group. |
| :warning: < kbd > shift< / kbd > + < kbd > alt< / kbd > + < kbd > LMB< / kbd > drag background | Remove nodes to the selection group. |
| < kbd > shift< / kbd > + < kbd > ctrl< / kbd > + < kbd > alt< / kbd > + < kbd > LMB< / kbd > click node name | Inverse node selection. |
| :warning: < kbd > shift< / kbd > + < kbd > ctrl< / kbd > + < kbd > alt< / kbd > + < kbd > LMB< / kbd > drag background | Inverse nodes selection. |
2020-05-19 15:24:12 +03:00
2020-10-20 05:44:35 +03:00
#### Node Editing
2020-07-11 04:00:26 +03:00
2022-10-25 20:21:12 +03:00
| Shortcut | Action |
| ------------------------------------------------ | ----------------------------------------------------------- |
2023-08-11 21:05:17 +03:00
| < kbd > enter< / kbd > | Open Component Browser to create a new node . |
2022-10-25 20:21:12 +03:00
| < kbd > backspace< / kbd > or < kbd > delete< / kbd > | Remove selected nodes. |
| < kbd > cmd< / kbd > +< kbd > g< / kbd > | Collapse (group) selected nodes. |
| < kbd > cmd< / kbd > +< kbd > LMB< / kbd > | Start editing node expression. |
| < kbd > cmd< / kbd > +< kbd > enter< / kbd > | Start editing node expression. |
| < kbd > enter< / kbd > or < kbd > LMB< / kbd > on suggestion | Pick selected suggestion and commit editing. |
| < kbd > cmd< / kbd > + < kbd > enter< / kbd > | Accept the current Component Browser expression input as-is |
| < kbd > tab< / kbd > | Pick selected suggestion and continue editing. |
2020-07-11 04:00:26 +03:00
2020-10-21 11:59:58 +03:00
#### Visualization
2020-10-20 05:44:35 +03:00
2021-11-05 14:51:43 +03:00
| Shortcut | Action |
| ----------------------------------------- | ------------------------------------------------------------- |
| < kbd > space< / kbd > | Toggle visualization visibility of the selected node. |
| < kbd > space< / kbd > hold | Preview visualization of the selected node (hide on release). |
| :warning: < kbd > space< / kbd > double press | Toggle visualization fullscreen mode |
| < kbd > ctrl< / kbd > + < kbd > space< / kbd > | Cycle visualizations of the selected node. |
| :bangbang: < kbd > cmd</ kbd > + < kbd > \\</ kbd > | Toggle documentation view visibility |
2020-07-11 04:00:26 +03:00
2020-11-02 23:59:27 +03:00
#### Visualizations Implementations
2022-10-25 20:21:12 +03:00
| Shortcut | Action |
| ----------------------------- | -------------------------------------------------- |
| < kbd > cmd< / kbd > + < kbd > a< / kbd > | Show all points if available in visualization. |
| < kbd > cmd< / kbd > + < kbd > z< / kbd > | Zoom into selection if available in visualization. |
2020-11-02 23:59:27 +03:00
2020-10-21 11:59:58 +03:00
#### Debug
2021-11-05 14:51:43 +03:00
| Shortcut | Action |
2023-05-11 15:05:51 +03:00
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
2023-05-23 11:19:27 +03:00
| < kbd > ctrl< / kbd > + < kbd > shift< / kbd > + < kbd > x< / kbd > | Force reloading file in the backend. May fix some issues with synchronization if they appear. |
2022-02-14 13:19:08 +03:00
| < kbd > ctrl< / kbd > + < kbd > shift< / kbd > + < kbd > d< / kbd > | Toggle Debug Mode. All actions below are only possible when it is activated. |
2021-11-05 14:51:43 +03:00
| < kbd > ctrl< / kbd > + < kbd > alt< / kbd > + < kbd > shift< / kbd > + < kbd > i< / kbd > | Open the developer console. |
| < kbd > ctrl< / kbd > + < kbd > alt< / kbd > + < kbd > shift< / kbd > + < kbd > r< / kbd > | Reload the visual interface. |
| < kbd > ctrl< / kbd > + < kbd > alt< / kbd > + < kbd > 0 - 10< / kbd > | Switch between debug rendering modes (0 is the normal mode). |
| < kbd > ctrl< / kbd > + < kbd > alt< / kbd > + < kbd > `< / kbd > | Toggle profiling monitor (performance, memory usage, etc). |
2023-02-21 00:24:51 +03:00
| < kbd > ctrl< / kbd > + < kbd > alt< / kbd > + < kbd > p< / kbd > | Toggle the visibility of internal components (private API) in the component browser. |
2021-11-05 14:51:43 +03:00
| < kbd > ctrl< / kbd > + < kbd > d< / kbd > | Send test data to the selected node. |
| < kbd > ctrl< / kbd > + < kbd > shift< / kbd > + < kbd > enter< / kbd > | Push a hardcoded breadcrumb without navigating. |
| < kbd > ctrl< / kbd > + < kbd > shift< / kbd > + < kbd > arrow up< / kbd > | Pop a breadcrumb without navigating. |
| < kbd > cmd< / kbd > + < kbd > i< / kbd > | Reload visualizations. To see the effect in the currently shown visualizations, you need to switch to another and switch back. |
2023-05-11 15:05:51 +03:00
| < kbd > ctrl< / kbd > + < kbd > shift< / kbd > + < kbd > b< / kbd > | Toggle read-only mode. |
Context restoration (#7662)
Add support for recovering from GL context loss. When the context is restored, the loading spinner is shown until shaders finish recompiling.
[vokoscreenNG-2023-08-25_09-39-11.webm](https://github.com/enso-org/enso/assets/1047859/cfa90ec5-72a1-41e6-bafa-177fa5e85fb2)
*While the context is missing, the loading spinner is rendered in the 0% state. (This condition will not normally be observed, except momentarily, as the browser should restore the context immediately if it is lost while the page is visible.) When we receive a new context, the spinner switches to the 90% state until restoration completes. Restoration is fast, as we don't need to do much work except recompiling shaders.*
# Important Notes
- A new debug hotkey, Ctrl+Alt+Shift+X, causes context loss for testing. Pressing it a second time causes context restoration.
- `Texture` is still a CPU-bound texture. It now uses the "immutable" `texStorage/texSubImage` API, which is a ["preferred alternative"](https://registry.khronos.org/webgl/specs/latest/2.0/#3.7.6) to the `texImage` API because it can be more efficient.
- The type for texture uniforms is now `Uniform<Option<Texture>>`. Texture uniforms are decoupled from the context.
- A new `ContextLost` error type can be returned by functions that cannot complete if the context is lost.
- Fix some crashes that could occur when context was lost.
- Clarify ownership of some rendering-related types: Externalize, and where possible eliminate, `Rc/RefCell`s.
2023-09-14 17:40:28 +03:00
| < kbd > ctrl< / kbd > + < kbd > alt< / kbd > + < kbd > shift< / kbd > + < kbd > x< / kbd > | Toggle WebGL Context loss / restoration for testing. |
2023-09-05 17:51:33 +03:00
| < kbd > ctrl< / kbd > + < kbd > shift< / kbd > + < kbd > u< / kbd > | Dump the suggestion database as JSON to the console. Available only in debug mode, and only if the component browser is open. |