MuseScore icon indicating copy to clipboard operation
MuseScore copied to clipboard

[MU4 Input Regression] Can't assign multiple shortcuts to the same action.

Open xlf1024 opened this issue 2 years ago • 2 comments

Describe the bug

The shortcuts section of the settings dialog doesn't allow assigning multiple shortcuts to the same action. This was possible in MuseScore 3.

To Reproduce

  1. Go to "Edit" -> "Preferences" -> "Shortcuts"
  2. Pick "Enter Note B" from the list (or any other entry)
  3. Click "Define..."
  4. Try to find a way to assign both "B" and "H" as shortcuts. There isn't.

Expected behavior There should be a way to add an additional shortcut, instead of overwriting all existing ones. Ideas:

  • Like in MuseScore 3, have "Add" and "Replace" buttons instead of "Save"
  • An "additional shortcut" checkbox. When checked, the "Save" button acts like the old "Add" button.
  • Separate shortcut boxes for each assigned shortcut, labeled "Shortcut 1", "Shortcut 2", etc. To overwrite an existing shortcut, click it's box; to add a new one, there should be an additional empty one. When that is assigned a shortcut, add a new one below etc. For deleting existing shortcuts, place a trashcan icon next to each box.

Platform information

  • OS: Windows 10 x64
  • MuseScore version (64-bit): 4.0.0-223472200, revision: github-musescore-musescore-5485621

Why

  • German uses "H" for B natural, and "B" for B flat. As natural/flat is handled by the key signature, I'd like both keys to be considered equal for note input (example from above). Related issues: #15404 , #12657
  • This would also allow assigning both sets of number keys to note duration selection; see #15204
  • Several predefined shortcuts, such as "Edit element" or the note duration selection for Tabulature have multiple shortcuts assigned, leading to the expectation that this is possible to achieve.

Workaround It is currently possible to "hack" in multiple shortcuts for the same action:

  1. Go to "Edit" -> "Preferences" -> "Shortcuts"
  2. Click "Export"; Save the file somewhere.
  3. Edit it with a text editor: 3.1. search for the existing shortcut 3.2. verify that the corresponding <key> seems like it matches the action you want to assign an additional shortcut t0o 3.3. duplicate the <seq> element 3.4. edit the content of the duplicate to your desired additional shortcut 3.5. save
  4. back in musescore, in that same dialog, click "Import" and select the modified file.

As an example; to assign both "B" and "H" to note input, in step 3, you'd change

    <SC>
        <key>note-b</key>
        <seq>B</seq>
    </SC>

to

    <SC>
        <key>note-b</key>
        <seq>B</seq>
        <seq>H</seq>
    </SC>

xlf1024 avatar Jan 03 '23 23:01 xlf1024

Here's two prepared shortcut .xml files for the use cases mentioned above. Unzip after downloading. Skip steps 2 and 3 in the workaround and use these files for step 4.

WARNING: using these will reset all your shortcuts to default! if you want to keep your other custom shortcuts follow the steps in the workaround above. These files can however still help you with finding the relevant sections to edit

B and H keys for note input (#15404) : musescore_shortcuts_note_intput_b_and_h.zip

Both sets of number keys for duration input (#15204) : musescore_shortcuts_note_duration_also_numpad.zip

Both changes combined: musescore_shortcuts_both.zip


I tried to have those files only modify the relevant parts by deleting everything else, but unfortunately, this seems to still reset everything else to default.

The uploads are zipped because github didn't let me upload the .xml files directly.

xlf1024 avatar Jan 03 '23 23:01 xlf1024

This is currently by design, as it is felt having multiple shortcuts was more confusing than it was worth. I don't necessarily agree, and designs are always subject to change based on user feedback, but anyhow, it's not a bug.

MarcSabatella avatar Jan 04 '23 04:01 MarcSabatella

Yes, we have removed the ability for multiple keys to be assigned to the same action due to the massive amounts of confusion it caused as well as the numerous bugs it produced.

However, the other problems you touched on do need to be fixed.

Tantacrul avatar Jan 10 '23 11:01 Tantacrul