From d01b0f460d1acebf5390d03600b47fbf85dc9758 Mon Sep 17 00:00:00 2001 From: "Stijn (\"stain\") Seghers" Date: Wed, 10 May 2023 10:40:24 +0200 Subject: [PATCH] Fix #6377: Change ctrl-r shortcut (#6620) 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. --- CHANGELOG.md | 8 ++++++++ app/gui/docs/product/shortcuts.md | 5 +++-- app/gui/view/src/project.rs | 6 +++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbf84dd94764..169f10cc8742 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 cmd+r to + cmd+shift+r][6620] to make it less likely + that it would be triggered by accident. As a consequence, the program + execution shortcuts changed from + cmd+shift+t/r to + cmd+alt+t/r. [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) diff --git a/app/gui/docs/product/shortcuts.md b/app/gui/docs/product/shortcuts.md index e1a649759797..815a2257e19b 100644 --- a/app/gui/docs/product/shortcuts.md +++ b/app/gui/docs/product/shortcuts.md @@ -40,6 +40,7 @@ broken and require further investigation. | ctrl+` | 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. | | cmd+o | Open project | | cmd+s | Save module | +| cmd+shift+r | Restore module from last save | | cmd+z | Undo last action | | cmd+y or cmd + shift + z | Redo last undone action | | cmd+q | Close the application (MacOS) | @@ -48,8 +49,8 @@ broken and require further investigation. | ctrl+w | Close the application (Windows, Linux) | | :warning: ctrl+p | Toggle profiling mode | | escape | Cancel current action. For example, drop currently dragged connection. | -| cmd+shift+t | Terminate the program execution | -| cmd+shift+r | Re-execute the program | +| cmd+alt+t | Terminate the program execution | +| cmd+alt+r | Re-execute the program | | cmd+shift+k | Switch the execution environment to Design. | | cmd+shift+l | Switch the execution environment to Live. | diff --git a/app/gui/view/src/project.rs b/app/gui/view/src/project.rs index 7f1e7c4db915..b92539147cc8 100644 --- a/app/gui/view/src/project.rs +++ b/app/gui/view/src/project.rs @@ -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"), ]