mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Allow mapping delete key via alt+delete key combination
This commit is contained in:
@ -198,18 +198,29 @@ namespace osu.Game.Overlays.KeyBinding
|
|||||||
if (!HasFocus)
|
if (!HasFocus)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
KeyCombination keyCombination = KeyCombination.FromInputState(state);
|
||||||
|
|
||||||
switch (args.Key)
|
switch (args.Key)
|
||||||
{
|
{
|
||||||
case Key.Escape:
|
case Key.Escape:
|
||||||
finalise();
|
finalise();
|
||||||
return true;
|
return true;
|
||||||
case Key.Delete:
|
case Key.Delete:
|
||||||
bindTarget.UpdateKeyCombination(InputKey.None);
|
if (keyCombination.Equals(InputKey.Delete))
|
||||||
finalise();
|
{
|
||||||
return true;
|
bindTarget.UpdateKeyCombination(InputKey.None);
|
||||||
|
finalise();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (keyCombination.Equals(new[] { InputKey.Alt, InputKey.Delete }))
|
||||||
|
{
|
||||||
|
keyCombination = InputKey.Delete;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
bindTarget.UpdateKeyCombination(KeyCombination.FromInputState(state));
|
bindTarget.UpdateKeyCombination(keyCombination);
|
||||||
if (!isModifier(args.Key)) finalise();
|
if (!isModifier(args.Key)) finalise();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user