From d8758ebaef93884190e6d135d971a3f7d12ddfb3 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sun, 18 Aug 2024 22:24:50 +0800 Subject: [PATCH] Click the button and handle the keyboard event should did the same things(trigger the action). --- .../Content/Compose/Toolbar/ToolbarEditActionButton.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Content/Compose/Toolbar/ToolbarEditActionButton.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Content/Compose/Toolbar/ToolbarEditActionButton.cs index aec6037f2..74fad1c68 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Content/Compose/Toolbar/ToolbarEditActionButton.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Content/Compose/Toolbar/ToolbarEditActionButton.cs @@ -17,10 +17,11 @@ public abstract partial class ToolbarEditActionButton : ToolbarButton, IKeyBindi public bool OnPressed(KeyBindingPressEvent e) { - if (e.Action == EditAction) - ToggleClickEffect(); + if (e.Action != EditAction) + return false; - return false; + // press button should did the same things as click. + return TriggerClick(); } public void OnReleased(KeyBindingReleaseEvent e)