Browse Source

FileSystem dock: Fix search shortcut

Follow-up to 533d3e78008dd083d38264a4778b34387668d84d which used a shortcut
not defined in 3.x.
Rémi Verschelde 4 years ago
parent
commit
a246dceb51
1 changed files with 3 additions and 2 deletions
  1. 3 2
      editor/filesystem_dock.cpp

+ 3 - 2
editor/filesystem_dock.cpp

@@ -2475,7 +2475,7 @@ void FileSystemDock::_tree_gui_input(Ref<InputEvent> p_event) {
 			_tree_rmb_option(FILE_REMOVE);
 			_tree_rmb_option(FILE_REMOVE);
 		} else if (ED_IS_SHORTCUT("filesystem_dock/rename", p_event)) {
 		} else if (ED_IS_SHORTCUT("filesystem_dock/rename", p_event)) {
 			_tree_rmb_option(FILE_RENAME);
 			_tree_rmb_option(FILE_RENAME);
-		} else if (ED_IS_SHORTCUT("editor/open_search", p_event)) {
+		} else if (ED_IS_SHORTCUT("filesystem_dock/open_search", p_event)) {
 			_focus_current_search_box();
 			_focus_current_search_box();
 		} else {
 		} else {
 			return;
 			return;
@@ -2500,7 +2500,7 @@ void FileSystemDock::_file_list_gui_input(Ref<InputEvent> p_event) {
 			_file_list_rmb_option(FILE_REMOVE);
 			_file_list_rmb_option(FILE_REMOVE);
 		} else if (ED_IS_SHORTCUT("filesystem_dock/rename", p_event)) {
 		} else if (ED_IS_SHORTCUT("filesystem_dock/rename", p_event)) {
 			_file_list_rmb_option(FILE_RENAME);
 			_file_list_rmb_option(FILE_RENAME);
-		} else if (ED_IS_SHORTCUT("editor/open_search", p_event)) {
+		} else if (ED_IS_SHORTCUT("filesystem_dock/open_search", p_event)) {
 			_focus_current_search_box();
 			_focus_current_search_box();
 		} else {
 		} else {
 			return;
 			return;
@@ -2658,6 +2658,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
 	ED_SHORTCUT("filesystem_dock/duplicate", TTR("Duplicate..."), KEY_MASK_CMD | KEY_D);
 	ED_SHORTCUT("filesystem_dock/duplicate", TTR("Duplicate..."), KEY_MASK_CMD | KEY_D);
 	ED_SHORTCUT("filesystem_dock/delete", TTR("Move to Trash"), KEY_DELETE);
 	ED_SHORTCUT("filesystem_dock/delete", TTR("Move to Trash"), KEY_DELETE);
 	ED_SHORTCUT("filesystem_dock/rename", TTR("Rename..."), KEY_F2);
 	ED_SHORTCUT("filesystem_dock/rename", TTR("Rename..."), KEY_F2);
+	ED_SHORTCUT("filesystem_dock/open_search", TTR("Focus the search box"), KEY_MASK_CMD | KEY_F);
 
 
 	VBoxContainer *top_vbc = memnew(VBoxContainer);
 	VBoxContainer *top_vbc = memnew(VBoxContainer);
 	add_child(top_vbc);
 	add_child(top_vbc);