From 06089a74e3e9504c7b1a59c6b4a91c85c0413fc3 Mon Sep 17 00:00:00 2001 From: MrTheMake Date: Thu, 15 Jun 2017 23:06:28 +0200 Subject: [PATCH] Handle the numpad's Enter in cases where only the normal Enter was handled --- osu.Game/Graphics/UserInterface/SearchTextBox.cs | 1 + osu.Game/Overlays/Dialog/PopupDialog.cs | 2 +- osu.Game/Screens/Select/SongSelect.cs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game/Graphics/UserInterface/SearchTextBox.cs b/osu.Game/Graphics/UserInterface/SearchTextBox.cs index 0a37024d0f..39db8d8be7 100644 --- a/osu.Game/Graphics/UserInterface/SearchTextBox.cs +++ b/osu.Game/Graphics/UserInterface/SearchTextBox.cs @@ -45,6 +45,7 @@ protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) case Key.Up: case Key.Down: return false; + case Key.KeypadEnter: case Key.Enter: if (!AllowCommit) return false; break; diff --git a/osu.Game/Overlays/Dialog/PopupDialog.cs b/osu.Game/Overlays/Dialog/PopupDialog.cs index 42819f7f87..13f6d3ca23 100644 --- a/osu.Game/Overlays/Dialog/PopupDialog.cs +++ b/osu.Game/Overlays/Dialog/PopupDialog.cs @@ -78,7 +78,7 @@ protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) { if (args.Repeat) return false; - if (args.Key == Key.Enter) + if (args.Key == Key.Enter || args.Key == Key.KeypadEnter) { Buttons.OfType().FirstOrDefault()?.TriggerOnClick(); return true; diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index 41fa53e8a3..dc6dfdfd81 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -371,6 +371,7 @@ protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) switch (args.Key) { + case Key.KeypadEnter: case Key.Enter: raiseSelect(); return true;