mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 12:57:39 +09:00
Implement midi keybindings
This commit is contained in:
parent
c9b1735a53
commit
738c6da594
@ -250,6 +250,28 @@ namespace osu.Game.Overlays.KeyBinding
|
|||||||
finalise();
|
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()
|
private void clear()
|
||||||
{
|
{
|
||||||
bindTarget.UpdateKeyCombination(InputKey.None);
|
bindTarget.UpdateKeyCombination(InputKey.None);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user