MuseScore icon indicating copy to clipboard operation
MuseScore copied to clipboard

fixed #24177: Shortcuts , and . make a < and > instead

Open Eism opened this issue 1 year ago • 5 comments

Resolves: #24177

The main idea of ​​this PR is to transfer the dialog for editing shortcuts from character-based to key combinations. Now, whenever we enter a shortcut, we translate the entered combination to key combinations, map it to the English layout, and write it to a file. Then, when opening the app, we translate the combination to the current layout. After this, only English characters will remain in the shortcut files.

https://github.com/user-attachments/assets/1e056311-e185-4597-b253-524148bdd6de

Eism avatar Oct 13 '24 08:10 Eism

When I set Alt+@ (Alt+Shift+2) as a keyboard shortcut, and then press it, I get an assertion failure: Scherm­afbeelding 2024-10-13 om 14 22 55 In ShortcutsController::resolveAction, sequence is empty; in ShortcutsInstanceModel::doActivate, m_shortcutMap only contains "Alt+Shift+2", while seq is "Shift+Alt+2".

Apart from that, there is one problem that this PR probably doesn't solve and that https://github.com/musescore/MuseScore/pull/25126 maybe does solve: not all keyboard layouts contain all keys. For example, an AZERTY keyboard has no . key, so Shift+. means nothing on such keyboard. Or, another example: on AZERTY, : is its own key, namely the same key as . would be on QWERTY. When you try to use : as a shortcut key, that gets now recorded as .. But . cannot be translated back to AZERTY, so you can't use the just-created keyboard shortcut.

cbjeukendrup avatar Oct 13 '24 12:10 cbjeukendrup

@cbjeukendrup thank you for testing! fixed the crash

Is there a problem with AZERTY in the master?

Eism avatar Oct 14 '24 06:10 Eism

@Eism I checked:

  • setting : as a custom shortcut with AZERTY works well in master
  • the default shortcuts Shift+, and Shift+. don't work with AZERTY in master

cbjeukendrup avatar Oct 14 '24 09:10 cbjeukendrup

Rebase needed.

See also #27953

Jojo-Schmitz avatar May 16 '25 15:05 Jojo-Schmitz

See also https://musescore.org/en/node/337994

Jojo-Schmitz avatar Jun 02 '25 07:06 Jojo-Schmitz