Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Percussion keyboard shortcuts #26222

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

mathesoncalum
Copy link
Contributor

@mathesoncalum mathesoncalum commented Jan 24, 2025

This PR implements our new-and-improved percussion shortcuts. After these changes, it will be possble to use keys beyond ABCDEFG to input percussion notes.



PR Overview

As outlined in the spec for this task, choosing “Define keyboard shortcut” from the percussion panel or editing shortcuts from the Customize kit dialog should prompt the user for an updated shortcut.

While the current flow provided by EditShortcutModel is quite similar to that of the new spec, it's clear that a more specialised model is required for percussion shortcuts (adding extra percussion-specific logic to EditShortcutModel probably wouldn't be appropriate/coherent, especially considering it's part of the framework module). The logic we're interested in also requires some decoupling from preferences.

To address this, 7984f8b extracts the content of our current EditShortcutDialog into an EditShortcutDialogContent component which can be re-used with other models across the application.

 The second commit here (7219ade) implements the EditPercussionShortcutDialog with an associated EditPercussionShortcutModel and provides a logic for opening it in PercussionUtilities.

Commit 6e4ba68 replaces the current shortcut dropdown in the customize kit dialog with a button that triggers the new flow, while commits cff5256 and 4fa176c lay the groundwork for actually using the expanded range of shortcuts for note input.

Next Steps

This isn't merge-ready yet. While this PR currently provides the logic/UI to assign expanded percussion shortcuts, they aren't usable without some tweaking to our note input logic. This will inevitably overlap with some other 4.5 tasks that are currently in-progress - the plan at the moment is to merge the other tasks before attempting the necessary tweaks here.

@mathesoncalum mathesoncalum force-pushed the percussion_keyboard_shortcuts branch 3 times, most recently from be3f41a to dcb3ee8 Compare January 24, 2025 16:10
@mathesoncalum mathesoncalum force-pushed the percussion_keyboard_shortcuts branch from dcb3ee8 to 6e4ba68 Compare January 24, 2025 16:16
@mathesoncalum mathesoncalum force-pushed the percussion_keyboard_shortcuts branch 3 times, most recently from 38853cc to e88e5ef Compare January 27, 2025 12:34
@mathesoncalum mathesoncalum requested review from Eism and removed request for cbjeukendrup January 27, 2025 13:02
@mathesoncalum mathesoncalum force-pushed the percussion_keyboard_shortcuts branch from e88e5ef to 4fa176c Compare January 27, 2025 15:50
readonly property int buttonMinWidth: 104
}

EditShortcutDialog {
StyledDialogView {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's move it to separate file

* MuseScore
* Music Composition & Notation
*
* Copyright (C) 2024 MuseScore BVBA and others
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2025 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants