Using a number keypad on Mac

• Jul 19, 2022 - 21:03

Version: 4.0-Alpha
Is it ok to do something like this in the shortcuts so my number keypad will change the selected note duration? I’m not sure if it is allowed to have the Num+4 assigned to two different functions as you see below. What is “pad-note-8-TAB” anyway?

    <SC>
        <key>pad-note-8</key>
        <seq>4</seq>
        <seq>Num+4</seq>
    </SC>
    <SC>
        <key>pad-note-8-TAB</key>
        <seq>Shift+4</seq>
        <seq>Num+4</seq>
    </SC>

Comments

Shortcuts can be assigned to multiple commands as long as they operate in different context - like normal mode vs note input etc. MuseScore normally detects conflicts automatically when you define shortcuts using the support method Edit / Preferences / Shortcuts. Any reason you're resorting to hand-editing the file? This seems very likely to cause problems, as you wouldn't know which combinations are going to conflict, and you also could easily get the syntax wrong. Plus you'll constantly have to wonder what some of those cryptic internal names are about - they were never meant to be seen by users. But for the record, "pad-note-8-TAB" should be the command to select the eighth note duration while in tab input mode.

In reply to by Marc Sabatella

Thanks for the training. That clears it up a lot.

Why am I doing it the hard way? I couldn’t figure out how to enter multiple keys in the UI. I also couldn’t figure out how to tell it I was using the number keypad. If I typed 4 on the keypad it was entered but when I closed the dialog it still didn’t work. That is, I couldn’t figure out how to get the shortcuts dialog to distinguish Num+4 as opposed to just 4.

In reply to by CraigRitchie

To add multiple shortcuts, just click the "Add" instead of "Replace" button in the shortcut definition dialog.

If your numeric keypad is sending different keycodes from numeric keypad versus standard keys, then this should should automatically be detected. It might display in the dialog as 4, but internally, it's the numeric keypad code that your keyboard actually sent.

In reply to by CraigRitchie

Ah, I didn't see you were talking about MuseScore 4. Generally, that discussion takes place elsewhere - the Development forum, or the chat on Discord, or issue reports on GitHub. Anyhow, indeed, MuseScore 4 is dropping support for multiple shortcuts per command except for the built-in commands that are meant to do this. The shortcut system is still in development for MuseScore 4, actually, lots of things didn't work in the private alpha, some have been fixed since, some are still being worked on.

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