mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Move shift-delete handling to switch
This commit is contained in:
@ -34,17 +34,19 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
public override bool OnPressed(PlatformAction action)
|
public override bool OnPressed(PlatformAction action)
|
||||||
{
|
{
|
||||||
// Shift+delete is handled via PlatformAction on macOS. this is not so useful in the context of a SearchTextBox
|
|
||||||
// as we do not allow arrow key navigation in the first place (ie. the caret should always be at the end of text)
|
|
||||||
// Avoid handling it here to allow other components to potentially consume the shortcut.
|
|
||||||
if (action.ActionType == PlatformActionType.CharNext && action.ActionMethod == PlatformActionMethod.Delete)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
switch (action.ActionType)
|
switch (action.ActionType)
|
||||||
{
|
{
|
||||||
case PlatformActionType.LineEnd:
|
case PlatformActionType.LineEnd:
|
||||||
case PlatformActionType.LineStart:
|
case PlatformActionType.LineStart:
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Shift+delete is handled via PlatformAction on macOS. this is not so useful in the context of a SearchTextBox
|
||||||
|
// as we do not allow arrow key navigation in the first place (ie. the caret should always be at the end of text)
|
||||||
|
// Avoid handling it here to allow other components to potentially consume the shortcut.
|
||||||
|
case PlatformActionType.CharNext:
|
||||||
|
if (action.ActionMethod == PlatformActionMethod.Delete)
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return base.OnPressed(action);
|
return base.OnPressed(action);
|
||||||
|
Reference in New Issue
Block a user