Bug: Single-key shortcuts conflict with typing in MS3

• Mar 20, 2023 - 21:31

In MuseScore 3, you cannot type letters that have been mapped to shortcuts if the function in question does not have a single-letter shortcut by default.

For instance, if I map the M key (normally "Toggle multimeasure rests") to "Show/hide mixer" (normally F10), typing 'm' in staff text, lyrics, title, etc. gives the error "Command toggle-mixer not valid in current state", and types nothing.

However, I can type the letter M using whatever non-letter shortcut I've mapped "toggle multimeasure rests" to. At the same time, if I set "toggle multimeasure rests" to a different single letter, that key still types the expected letter.

This issue is NOT present in MS4, but is still a fairly egregious bug in legacy software.

Issue was found on a Mac running Monterey 12.6.


Comments

Hmm, here's the code for those:

      {
         MsWidget::MAIN_WINDOW,
#ifdef Q_OS_MAC
         //Avoid conflict with M in text
         STATE_NORMAL | STATE_NOTE_ENTRY | STATE_PLAY,
#else
         STATE_NORMAL | STATE_NOTE_ENTRY | STATE_EDIT | STATE_PLAY,
#endif
         "toggle-mixer",
         QT_TRANSLATE_NOOP("action","Mixer"),
         QT_TRANSLATE_NOOP("action","Toggle 'Mixer'"),
         0,
         Icons::Invalid_ICON,
         Qt::ApplicationShortcut
         },
...
      {
         MsWidget::SCORE_TAB,
         STATE_NORMAL,
         "toggle-mmrest",
         QT_TRANSLATE_NOOP("action","Toggle 'Create Multimeasure Rest'"),
         QT_TRANSLATE_NOOP("action","Toggle 'Create Multimeasure Rest'"),
         0,
         Icons::Invalid_ICON,
         Qt::WindowShortcut
         },
      {

So there is specialy-casing going on for Mac. That code is in since ages, at least since MuseScore 2, but probably in MuseScore 1 already

Do you still have an unanswered question? Please log in first to post your question.