mirror of
https://github.com/osukey/osukey.git
synced 2025-06-03 11:57:36 +09:00
Implement midi keybindings
This commit is contained in:
parent
c9b1735a53
commit
738c6da594
@ -250,6 +250,28 @@ namespace osu.Game.Overlays.KeyBinding
|
||||
finalise();
|
||||
}
|
||||
|
||||
protected override bool OnMidiDown(MidiDownEvent e)
|
||||
{
|
||||
if (!HasFocus)
|
||||
return false;
|
||||
|
||||
bindTarget.UpdateKeyCombination(KeyCombination.FromInputState(e.CurrentState));
|
||||
finalise();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void OnMidiUp(MidiUpEvent e)
|
||||
{
|
||||
if (!HasFocus)
|
||||
{
|
||||
base.OnMidiUp(e);
|
||||
return;
|
||||
}
|
||||
|
||||
finalise();
|
||||
}
|
||||
|
||||
private void clear()
|
||||
{
|
||||
bindTarget.UpdateKeyCombination(InputKey.None);
|
||||
|
Loading…
x
Reference in New Issue
Block a user