diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-04-25 15:04:49 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-04-25 15:48:08 +0200 |
commit | 79e4e267380a25b6e525198c5baa8598b2a2620e (patch) | |
tree | 3041f8786b7724e38ca57924aa0832b86ebabccb | |
parent | 7899b3e734e5c64304e8ffb56293fb4b1912b547 (diff) |
Require Ctrl for switching between editors, bind F2 to Rename Node
Switching between editors now requires holding Ctrl to avoid
conflicts with the new F2 shortcut.
The asset library can now be accessed by pressing Ctrl + F4
on Windows and Linux, or Alt + 4 on macOS.
This partially addresses #38139.
-rw-r--r-- | editor/editor_node.cpp | 10 | ||||
-rw-r--r-- | editor/scene_tree_dock.cpp | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 3569cd411d..53e7bcdc25 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -6828,14 +6828,16 @@ EditorNode::EditorNode() { ED_SHORTCUT("editor/editor_2d", TTR("Open 2D Editor"), KEY_MASK_ALT | KEY_1); ED_SHORTCUT("editor/editor_3d", TTR("Open 3D Editor"), KEY_MASK_ALT | KEY_2); ED_SHORTCUT("editor/editor_script", TTR("Open Script Editor"), KEY_MASK_ALT | KEY_3); + ED_SHORTCUT("editor/editor_assetlib", TTR("Open Asset Library"), KEY_MASK_ALT | KEY_4); ED_SHORTCUT("editor/editor_help", TTR("Search Help"), KEY_MASK_ALT | KEY_SPACE); #else - ED_SHORTCUT("editor/editor_2d", TTR("Open 2D Editor"), KEY_F1); - ED_SHORTCUT("editor/editor_3d", TTR("Open 3D Editor"), KEY_F2); - ED_SHORTCUT("editor/editor_script", TTR("Open Script Editor"), KEY_F3); //hack needed for script editor F3 search to work :) Assign like this or don't use F3 + // Use the Ctrl modifier so F2 can be used to rename nodes in the scene tree dock. + ED_SHORTCUT("editor/editor_2d", TTR("Open 2D Editor"), KEY_MASK_CTRL | KEY_F1); + ED_SHORTCUT("editor/editor_3d", TTR("Open 3D Editor"), KEY_MASK_CTRL | KEY_F2); + ED_SHORTCUT("editor/editor_script", TTR("Open Script Editor"), KEY_MASK_CTRL | KEY_F3); + ED_SHORTCUT("editor/editor_assetlib", TTR("Open Asset Library"), KEY_MASK_CTRL | KEY_F4); ED_SHORTCUT("editor/editor_help", TTR("Search Help"), KEY_MASK_SHIFT | KEY_F1); #endif - ED_SHORTCUT("editor/editor_assetlib", TTR("Open Asset Library")); ED_SHORTCUT("editor/editor_next", TTR("Open the next Editor")); ED_SHORTCUT("editor/editor_prev", TTR("Open the previous Editor")); diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 4041256dd5..7227c2ce12 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -2797,8 +2797,8 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel HBoxContainer *filter_hbc = memnew(HBoxContainer); filter_hbc->add_theme_constant_override("separate", 0); - ED_SHORTCUT("scene_tree/rename", TTR("Rename")); - ED_SHORTCUT("scene_tree/batch_rename", TTR("Batch Rename"), KEY_MASK_CMD | KEY_F2); + ED_SHORTCUT("scene_tree/rename", TTR("Rename"), KEY_F2); + ED_SHORTCUT("scene_tree/batch_rename", TTR("Batch Rename"), KEY_MASK_SHIFT | KEY_F2); ED_SHORTCUT("scene_tree/add_child_node", TTR("Add Child Node"), KEY_MASK_CMD | KEY_A); ED_SHORTCUT("scene_tree/instance_scene", TTR("Instance Child Scene")); ED_SHORTCUT("scene_tree/expand_collapse_all", TTR("Expand/Collapse All")); |