mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:20:04 +08:00
Use local workaround instead of disabling clipboard entirely
This commit is contained in:
parent
cfc0520481
commit
366e41f111
@ -9,6 +9,7 @@ using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Collections;
|
||||
@ -23,6 +24,7 @@ using osu.Game.Rulesets;
|
||||
using osu.Game.Screens.Select.Filter;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
using osuTK.Input;
|
||||
|
||||
namespace osu.Game.Screens.Select
|
||||
{
|
||||
@ -254,9 +256,6 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
public OsuSpriteText FilterText { get; private set; }
|
||||
|
||||
// clipboard is disabled because one of the "cut" platform key bindings (shift-delete) conflicts with the beatmap deletion action.
|
||||
protected override bool AllowClipboardExport => false;
|
||||
|
||||
public FilterControlTextBox()
|
||||
{
|
||||
Height += filter_text_size;
|
||||
@ -277,6 +276,15 @@ namespace osu.Game.Screens.Select
|
||||
Colour = colours.Yellow
|
||||
});
|
||||
}
|
||||
|
||||
public override bool OnPressed(KeyBindingPressEvent<PlatformAction> e)
|
||||
{
|
||||
// the "cut" platform key binding (shift-delete) conflicts with the beatmap deletion action.
|
||||
if (e.Action == PlatformAction.Cut && e.ShiftPressed && e.CurrentState.Keyboard.Keys.IsPressed(Key.Delete))
|
||||
return false;
|
||||
|
||||
return base.OnPressed(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user