mirror of https://github.com/ppy/osu
Merge pull request #938 from MrTheMake/numpad-enter
Handle the numpad's Enter in cases where only the normal Enter was handled
This commit is contained in:
commit
62a0c780af
|
@ -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;
|
||||
|
|
|
@ -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<PopupDialogOkButton>().FirstOrDefault()?.TriggerOnClick();
|
||||
return true;
|
||||
|
|
|
@ -371,6 +371,7 @@ protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
|||
|
||||
switch (args.Key)
|
||||
{
|
||||
case Key.KeypadEnter:
|
||||
case Key.Enter:
|
||||
raiseSelect();
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue