Skip to content

Commit

Permalink
Fix #6377: Change ctrl-r shortcut (#6620)
Browse files Browse the repository at this point in the history
Fixes #6377: The fact that `ctrl-r` was restoring the project to potentially the initial state was confusing. This PR changes that shortcut to `ctrl-shift-r`, as discussed in #6377.

Note that:
- `ctrl-shift-r` was already taken by the re-execution shortcut, so that got the `ctrl-alt` modifiers instead, along with the interruption shortcut for consistency.
- `ctrl-alt-shift-r` was already taken by a shortcut to refresh the whole Electron app, so that wasn't available.
  • Loading branch information
Procrat authored May 10, 2023
1 parent 7119811 commit d01b0f4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,17 @@
- [Fixed text visualisations which were being cut off at the last line.][6421]
- [Fixed a bug where, when scrolling or dragging on a full-screen visualization,
the view of the graph changed as well.][6530]
- [Changed the shortcut for restoring to the last saved version of a project
from <kbd>cmd</kbd>+<kbd>r</kbd> to
<kbd>cmd</kbd>+<kbd>shift</kbd>+<kbd>r</kbd>][6620] to make it less likely
that it would be triggered by accident. As a consequence, the program
execution shortcuts changed from
<kbd>cmd</kbd>+<kbd>shift</kbd>+<kbd>t</kbd>/<kbd>r</kbd> to
<kbd>cmd</kbd>+<kbd>alt</kbd>+<kbd>t</kbd>/<kbd>r</kbd>.

[6421]: https://github.com/enso-org/enso/pull/6421
[6530]: https://github.com/enso-org/enso/pull/6530
[6620]: https://github.com/enso-org/enso/pull/6620

#### EnsoGL (rendering engine)

Expand Down
5 changes: 3 additions & 2 deletions app/gui/docs/product/shortcuts.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ broken and require further investigation.
| <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 |
| <kbd>cmd</kbd>+<kbd>shift</kbd>+<kbd>r</kbd> | Restore module from last save |
| <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) |
Expand All @@ -48,8 +49,8 @@ broken and require further investigation.
| <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. |
| <kbd>cmd</kbd>+<kbd>shift</kbd>+<kbd>t</kbd> | Terminate the program execution |
| <kbd>cmd</kbd>+<kbd>shift</kbd>+<kbd>r</kbd> | Re-execute the program |
| <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 |
| <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. |

Expand Down
6 changes: 3 additions & 3 deletions app/gui/view/src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -701,14 +701,14 @@ impl application::View for View {
(Press, "", "cmd alt shift t", "toggle_style"),
(Press, "", "cmd alt p", "toggle_component_browser_private_entries_visibility"),
(Press, "", "cmd s", "save_project_snapshot"),
(Press, "", "cmd r", "restore_project_snapshot"),
(Press, "", "cmd shift r", "restore_project_snapshot"),
(Press, "", "cmd z", "undo"),
(Press, "", "cmd y", "redo"),
(Press, "", "cmd shift z", "redo"),
(Press, "!debug_mode", DEBUG_MODE_SHORTCUT, "enable_debug_mode"),
(Press, "debug_mode", DEBUG_MODE_SHORTCUT, "disable_debug_mode"),
(Press, "", "cmd shift t", "execution_context_interrupt"),
(Press, "", "cmd shift r", "execution_context_restart"),
(Press, "", "cmd alt t", "execution_context_interrupt"),
(Press, "", "cmd alt r", "execution_context_restart"),
// TODO(#6179): Remove this temporary shortcut when Play button is ready.
(Press, "", "ctrl shift b", "toggle_read_only"),
]
Expand Down

0 comments on commit d01b0f4

Please sign in to comment.