MuseScore icon indicating copy to clipboard operation
MuseScore copied to clipboard

[MU4 Issue] Num pad not responding for duration selection

Open mccoydtromb opened this issue 1 year ago • 41 comments

Describe the bug Using num pad no longer works for selecting durations. I have checked Num Lock (makes numpad into arrows which navigate around buttons or notes). The problem started after I had been experimenting with using MuseScore with a MIDI keyboard. To remove the MIDI keyboard from the input slot I also clicked "Reset Preferences", so it may be due to that. I tried re-adding the numbers as shortcuts, but that didn't do it. Interesting point is that the numpad dot still selects dotted note, and + for ties and / for acciaccaturas still work.

Steps to reproduce the behavior: I can only guess that Reset Preferences does this, but haven't been able to test from a starting point again.

Expected behavior Use num pad numbers same as number row to select durations

Platform information

  • OS: Windows 10
  • MuseScore 4 Alpha

mccoydtromb avatar Aug 11 '22 11:08 mccoydtromb

I forgot. Did you try reset to factory settings. You can find that in the Help menu

HemantAntony avatar Aug 11 '22 11:08 HemantAntony

Great idea. Just tried it, still no joy. Reinstall also didn't change anything.

mccoydtromb avatar Aug 11 '22 13:08 mccoydtromb

But it's not my keyboard, because it works in 3.6

mccoydtromb avatar Aug 11 '22 13:08 mccoydtromb

I noticed this a while back. For the Num Pad to work the shortcut must register as NumPad. For example, “Num+4”, and not just “4”. The shortcuts dialog is not picking up this distinction when editing the shortcut. As a work around I exported the shortcuts and manually added the NumPad shortcuts in the proper places and then imported them back into MuseScore. It worked but this is definitely not a long term solution and can be dangerous as it by passes the application’s validations.

I’d definitely like the num pad to work. I bought a separate num pad so I can place it on my left hand while I work the mouse with my right hand.

Here is my thread on the MuseScore forum: https://musescore.org/en/node/333674

critchie avatar Aug 11 '22 13:08 critchie

Interesting, as in MS3 and MS4 the shortcut definition seems to be similar for these keys:

MS3: image

MS4: image

Obvious note the slight different on the NumPad text in MS3 vs Num in MS4. However it does seem the "NumPad" keys are assigned to other functions, but still in MS3 they can be used to select the duration. Would definitely like this functionality to be standard in MS4.

EDIT: Just tested...and in MS4 (without any modifications) the duration selection is working for TAB staves.

henkdegroot avatar Aug 11 '22 15:08 henkdegroot

Yeah… clearly something is different between the two versions. When I export the shortcuts and edit the XML to this:

<SC> <key>pad-note-8</key> <seq>4</seq> <seq>Num+4</seq> </SC> Then import it back in the NumPad works.

critchie avatar Aug 11 '22 15:08 critchie

Well you should not have to define any shortcut. For a regular staff, the "keyboard" numbers and "numpad" numbers should be treated as the same key. If it was not required in MS3, then it should be possible to get the same behaviour in MS4.

henkdegroot avatar Aug 11 '22 17:08 henkdegroot

It was always very system-dependent in MU3 - worked out of the box on some systems, not on others. of the one where it didn't work out of the box, some could be fixed by manually setting the shortcut, others were not so lucky. Seems the same situation exists in MU4 except for the specifics of which systems are in which category. Not sure it's even technically possible to get it to always work correctly out of the box for all systems - different OS's, different keyboard layouts, different language settings, different device drivers, etc. But it's reasonable to hope that manually setting the shortcut will work "almost always".

MarcSabatella avatar Aug 11 '22 17:08 MarcSabatella

Understand what you are saying, but that does not explain the different behaviour between MS3 and MS4 on the SAME laptop and thus using the same OS. It might just be something missed when transferring the code to the new MS4 structure (at least that is my guess).

However, as mentioned by @critchie manual setting the "numpad" key in shortcuts is not even possible.

henkdegroot avatar Aug 11 '22 17:08 henkdegroot

Different versions of Qt, different ways of processing that input within MuseScore - I'm sure that explains the difference. I believe others have said they can set the numpad via the dialog, which is why it seems to me the situation is the same as MU3 - works on some systems, not on others. Maybe I imagined that? Anyhow, I don't have a numpad available to test with. I just want to add some clarifying info that this was always a problem in MU3 on some systems.

MarcSabatella avatar Aug 11 '22 18:08 MarcSabatella

It seems to me the issue is in the Edit Shortcut dialog. When I press 4 on the NumPad, MuseScore must enter Num+4 and not just 4. It needs to look at the key event and use the proper key value from the Key enum. It has to distinguish between NumPad4 and D4.

When I edit the exported XML and manually add the Num+4 MuseScore handles the shortcuts properly. If I hit the NumPad 4 or the keyboard 4 the duration changes to an eighth note. So the application reacts properly once the shortcut is setup.

critchie avatar Aug 11 '22 18:08 critchie

Interesting, because I've been using the Numpad for all my testing of nightlies, but suddenly not happening in the alpha.

mccoydtromb avatar Aug 11 '22 18:08 mccoydtromb

I have the same problem. A piece of information that may be irrelevant: when I try to add new shortcut and try to use (for testing) Ctrl + Numpad keys it shows in MU4 as "Ctrl+Pause". That being said, it has the same behavior in MU3 and numpad works correctly there (Win 10)

Roman251 avatar Aug 12 '22 09:08 Roman251

Hi guys,

Same issue here with MuseSCore 4 (OS: Windows 10 Version 1809, Arch.: x86_64, MuseScore version (64-bit): 4.0.0-2844400529, revision: github-musescore-musescore-abc123456)

Neither default shorcut nor manually change shortcuts work on my side.

daeavelwyn avatar Aug 14 '22 12:08 daeavelwyn

I have the same issue (in alpha 2, windows 10, newly installed). I am not able to fix it in the options menu (when I press "4" on the numpad, it just sets the shortcut to "4", but when working in the score, pressing "4" on the numpad does not trigger the shortcut).

So it seems that at least for me, the shortcut menu and the main program interprets the same keypress in two different ways. I am using a logitec "LogiLink" external keypad with default windows drivers, if that matters.

Exporting the shortcut file and manually editing it (like Critchie described) worked.

(EDIT: clarified that I'm using windows)

sikamber avatar Sep 02 '22 19:09 sikamber

For me numpad works (latest nightly OS: Ubuntu 22.04.1 LTS, Arch.: x86_64, MuseScore version (64-bit): 4.0.0-2990798632, revision: github-musescore-musescore-5d26e7f)

sammik avatar Sep 07 '22 16:09 sammik

Hi folks,

I first removed all my previous preferences (documents, appdata in local and roaming)

I just tested once more with OS: Windows 10 Version 1809, Arch.: x86_64, MuseScore version (64-bit): 4.0.0-3005078110, revision: github-musescore-musescore-abc123456 and got the same issue. French AZERTY keyboard

The numpad just doesn't work and the numbers on the alphanumeric part of the keyboard work (shift + number) except the number 6...). I also tried ctrl+number and it seems to work except for the 6.... So I tried with another keyboard but got the same result.

I've tried to remove 'kind of' dupplicate entries I found in the default shortcut map (example : 6 is use also for tab) but it still doesn't work.

Any tests I could do to help solving this ?

daeavelwyn avatar Sep 07 '22 23:09 daeavelwyn

I see similar problems with MU4-alpha2 with ties not working as in MU3 and with shortcuts, both as downloaded and after attempting to edit the shortcuts. I tried editing in the app and offline with an XML editor and neither approach worked. Clicking the tie command in the tool bar works as expected. System info: Win11, v10.0.22621, 64-bit

napochanIsMe avatar Nov 17 '22 01:11 napochanIsMe

The tie command has changed to “T” :-)

MarcSabatella avatar Nov 17 '22 02:11 MarcSabatella

The tie command has changed to “T” :-)

Thanks Marc. I just need some retraining to learn the new shortcut!

napochanIsMe avatar Nov 17 '22 22:11 napochanIsMe

Using a Mac and Apple computer keyboard, I too am not able to use the numeric keypad to enter note durations. Even if I go to settings/shortcuts and use the keypad to alter the shortcut for a note duration, it still won't recognize the keypad for note durations, only the number row across the top of the keyboard.

OS: macOS 12.6, Arch.: x86_64, MuseScore version (64-bit): 4.0.0-223472200, revision: github-musescore-musescore-5485621

trevorspecht avatar Dec 18 '22 02:12 trevorspecht

As mentioned before, exporting the shortcuts as an XML file and editing it, then importing it back, will fix the problem if you do it as in the example screenshot below (screenshot doesn't show all the keypad numbers, but is a good enough example)

Export and Import are right here:

image Screen Shot 2022-12-17 at 9 40 18 PM

trevorspecht avatar Dec 18 '22 02:12 trevorspecht

ah, now I see where the problem lies. The numpad only works for me if I am entering note values in the TAB staff. But I do not understand the logic behind some numpads working and some not (unless a guitar tab is being used.).

KatrinaHahn1 avatar Dec 18 '22 09:12 KatrinaHahn1

Hello folks,

I just installed the first stable release of musescore 4 and the problem still remains. And I'm now using a new laptop (lenovo t460) still using windows 10 enterprise 1809.

To reproduce : -Create a simple score with, for example a flute staff -Enter the input mode (using N shortcut) -I can change rhythm values with number from 1 to 5 with my azerty laptop keyboard. The number 7 also works. BUT the number 6 doesn't work....

i tried the suggested workaround in previous post but it doesn't work. Any ideas ?

daeavelwyn avatar Dec 18 '22 19:12 daeavelwyn

Please don't forget about Mac users!

Numeric keypad not working to set note duration on wired extended Apple Mac keyboard.

Using production MuseScore 4 that I downloaded directly from the webpage.

OS: macOS 12.6, Arch.: x86_64, MuseScore version (64-bit): 4.0.0-223472200, revision: github-musescore-musescore-5485621

Mac OS: 12.6.1 Mac Mini (mid 2018) 3.0 Ghz 6 Core Intel i5 32 G RAM

Is there a workaround for the Mac?

Don

DonW-Music avatar Dec 21 '22 15:12 DonW-Music

I just downloaded the official stable 4 release from musescor.org website and I can confirm that the problem still persists. It is much easer to type notes and pauses durations using numpad, so while this issue is not solved, I'll have to keep using Musescore 3. I really hope this problem to be solved soon. Thanks

ivanobom avatar Jan 07 '23 16:01 ivanobom

The problem seems to affect some numpads but not others, meanwhile there is a very simple workaround. Just download this file then go to Edit / Preferences / Shortucts, hit the Import button, and open the file you downloaded.

MarcSabatella avatar Jan 07 '23 17:01 MarcSabatella

There's a fairly easy workaround that was passed on by Marc Sabatella, involving importing an xml file for shortcuts. Would be good to have that link on this discussion for everyone who finds it until the fix arrives.

On Sat, 07 Jan 2023, 18:17 ivanobom, @.***> wrote:

I just downloaded the official stable release from musescor.org website and I can confirm that the problem still persists. It is much easer to type notes and pauses durations using numpad, so while this issue is not solved, I'll have to keep using Musescore 3. I really hope this problem to be solved soon. Thanks

— Reply to this email directly, view it on GitHub https://github.com/musescore/MuseScore/issues/12791#issuecomment-1374530147, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWDFIEZZRRRESKPNOGUZ7PTWRGJKZANCNFSM56H2BQ3Q . You are receiving this because you authored the thread.Message ID: @.***>

mccoydtromb avatar Jan 07 '23 17:01 mccoydtromb

@MarcSabatella and @mccoydtromb thanks for your reply but this workaround doesn't work for my problem.

That's a very strange issue as many other software use keyboard shortcuts without facing the problem mentioned in this thread, so maybe it would be possible for devs to look around open sources projects they don't have such an issue ?

daeavelwyn avatar Jan 07 '23 19:01 daeavelwyn

The fact that this method doesn’t work for you when it does for almost everyone else - and the fact that not everyone has this problem in the first place - demonstrates that it just isn’t that simple. There are tons of different keyboard designs out there, and it’s a mistake to assume that some other program works with literally every single keyboard. But indeed, it’s possible to do better than we currently do.

MarcSabatella avatar Jan 07 '23 22:01 MarcSabatella