mirror of
https://github.com/osukey/osukey.git
synced 2025-06-23 12:18:03 +09:00
Fix overbearing key down handling
This commit is contained in:
parent
a1fc4def1d
commit
8d2e852ffd
@ -81,24 +81,21 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
|
|
||||||
protected override bool OnKeyDown(KeyDownEvent e)
|
protected override bool OnKeyDown(KeyDownEvent e)
|
||||||
{
|
{
|
||||||
base.OnKeyDown(e);
|
if (IsDragged && (e.Key == Key.ShiftLeft || e.Key == Key.ShiftRight))
|
||||||
|
|
||||||
if (cumulativeRotation.Value != null && (e.Key == Key.ShiftLeft || e.Key == Key.ShiftRight))
|
|
||||||
{
|
{
|
||||||
applyRotation(shouldSnap: true);
|
applyRotation(shouldSnap: true);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return base.OnKeyDown(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnKeyUp(KeyUpEvent e)
|
protected override void OnKeyUp(KeyUpEvent e)
|
||||||
{
|
{
|
||||||
base.OnKeyUp(e);
|
base.OnKeyUp(e);
|
||||||
|
|
||||||
if (cumulativeRotation.Value != null && (e.Key == Key.ShiftLeft || e.Key == Key.ShiftRight))
|
if (IsDragged && (e.Key == Key.ShiftLeft || e.Key == Key.ShiftRight))
|
||||||
{
|
|
||||||
applyRotation(shouldSnap: false);
|
applyRotation(shouldSnap: false);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnDragEnd(DragEndEvent e)
|
protected override void OnDragEnd(DragEndEvent e)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user