diff --git a/OpenRA.Mods.Common/Widgets/Logic/Editor/ActorSelectorLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Editor/ActorSelectorLogic.cs index 392fa2372f..b2771c3997 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Editor/ActorSelectorLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Editor/ActorSelectorLogic.cs @@ -165,6 +165,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic InitializeActorPreviews(); }; + searchTextField.OnEscKey = () => + { + searchTextField.Text = ""; + searchTextField.YieldKeyboardFocus(); + return true; + }; + var actorCategorySelector = widget.Get("CATEGORIES_DROPDOWN"); actorCategorySelector.GetText = () => { diff --git a/OpenRA.Mods.Common/Widgets/Logic/Editor/TileSelectorLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Editor/TileSelectorLogic.cs index 94fc44fd54..5af2f04643 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Editor/TileSelectorLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Editor/TileSelectorLogic.cs @@ -73,6 +73,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic InitializeTilePreview(); }; + searchTextField.OnEscKey = () => + { + searchTextField.Text = ""; + searchTextField.YieldKeyboardFocus(); + return true; + }; + Func categoryTitle = s => s != null ? s : "Search Results"; Func setupItem = (option, template) => {