Skip to content

Commit

Permalink
Click the button and handle the keyboard event should did the same th…
Browse files Browse the repository at this point in the history
…ings(trigger the action).
  • Loading branch information
andy840119 committed Aug 18, 2024
1 parent f8b2f65 commit d8758eb
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ public abstract partial class ToolbarEditActionButton : ToolbarButton, IKeyBindi

public bool OnPressed(KeyBindingPressEvent<KaraokeEditAction> 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<KaraokeEditAction> e)
Expand Down

0 comments on commit d8758eb

Please sign in to comment.