From e64f455ff74d14fcf31f417d8406cc0f86e24241 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 16 Aug 2017 23:01:10 +0900 Subject: [PATCH] Escape to cancel, again --- osu.Game/Overlays/KeyBinding/KeyBindingRow.cs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/osu.Game/Overlays/KeyBinding/KeyBindingRow.cs b/osu.Game/Overlays/KeyBinding/KeyBindingRow.cs index 3415c22972..274619991c 100644 --- a/osu.Game/Overlays/KeyBinding/KeyBindingRow.cs +++ b/osu.Game/Overlays/KeyBinding/KeyBindingRow.cs @@ -142,12 +142,16 @@ namespace osu.Game.Overlays.KeyBinding protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) { - if (args.Key == Key.Delete) + switch (args.Key) { - bindTarget.UpdateKeyCombination(Key.Unknown); - store.Update(bindTarget.KeyBinding); - GetContainingInputManager().ChangeFocus(null); - return true; + case Key.Escape: + GetContainingInputManager().ChangeFocus(null); + return true; + case Key.Delete: + bindTarget.UpdateKeyCombination(Key.Unknown); + store.Update(bindTarget.KeyBinding); + GetContainingInputManager().ChangeFocus(null); + return true; } if (HasFocus)