MuseScore icon indicating copy to clipboard operation
MuseScore copied to clipboard

Set default shortcuts for toggling accidentals and ties

Open quinnouyang opened this issue 2 years ago • 11 comments

Resolves: #11516

Summary of changes:

  • Set default toggles for sharp to +, flat to -, natural to =, and tie to t (used to be +). Removed default shortcut for toggling autoplace.
  • Clarified descriptions and translations by replacing unicode symbols with text and specifying if the shortcut is a toggle

Please check if the translations/descriptions are good! Functionality seems to work on my end, although there is no audio playback from toggling accidentals. (New issue?)

image
  • [x] I signed CLA
  • [x] I made sure the code in the PR follows the coding rules
  • [x] I made sure the code compiles on my machine
  • [x] I made sure there are no unnecessary changes in the code
  • [x] I made sure the title of the PR reflects the core meaning of the issue you are solving
  • [x] I made sure the commit message(s) contain a description and answer the question "Why do those changes fix that particular issue?" or "Why are those changes really necessary as improvements?"
  • [x] I made sure the commit message title starts with "fix #424242:" if there is a related issue
  • [ ] I created the test (mtest, vtest, script test) to verify the changes I made

quinnouyang avatar May 05 '22 14:05 quinnouyang

@bkunda please check the build from this PR

Eism avatar May 17 '22 05:05 Eism

@quinnouyang this is coming along well!

Only one issue I found:

  • On Mac, when using a QWERTZ keyboard (German), I am unable to trigger the "natural" command. In this particular case, I need to use Shift to access the = key, which doesn't seem to work. I also tried deliberately re-assigning the shortcut to Shift+= but this didn't work either. FWIW, I'm not sure this is a Shift key issue because I also need to use Shift on my QWERTY keyboard (because = and + occupy the same key), and this works fine.

Also audio seems to work fine for me when I enter accidentals.

bkunda avatar May 17 '22 07:05 bkunda

@bkunda Thanks! For reference, I can only test with a Mac QWERTY keyboard.

I think the issue is on how we encode "secondary" characters on certain keyboards. From my experimentation, I cannot trigger shortcuts with !, @, #, etc. depiste + working, all of which physically require Shift+[number/"primary" character] for me.

I notice that we encoded some characters using their references, e.g. < is &lt;. Uses of references vary by the shortcut file (keyboard layout). I tried experimenting by getting !, @, # to work by using their references only with no success.

On a tangent, my zoom shortcut doesn't work (Ctrl++) on the latest master build. Probably for similar reasons...

quinnouyang avatar May 17 '22 15:05 quinnouyang

I think the issue is on how we encode "secondary" characters on certain keyboards

Sounds like this might need some further investigation then. @cbjeukendrup @RomanPudashkin @Eism if you have any pointers here? Is this something we need to tackle internally?

bkunda avatar May 18 '22 10:05 bkunda

@Eism I'm going to suggest we implement this and then raise the issue described above (about the Shift key not working on some – i.e. QWERTZ – keyboards) as a separate issue.

...unless of course the discussion about "secondary keys" above rings any alarm bells for you.

bkunda avatar Sep 05 '22 11:09 bkunda

@bkunda @Eism @Tantacrul Is there a reason not to merge this? We'd really like to be moving faster on documentation and translation, but still having uncertainty about some of these basic shortcuts is getting in the way. It would be good to settle on what the default shortcuts for 4.0 will be and make that happen before beta.

Also see https://github.com/musescore/MuseScore/pull/11854

To my knowledge, these two PR's represent the only pending changes to the default shortcuts being considered for 4.0, but if there are others, we'd really like to know before we get too much deeper into documentation and translation.

From my read of the code and understanding of the discussions, the following are the changes we are expecting:

Shortcuts being added

  • Sharp: +
  • Flat: -
  • Natural: =

Shortcuts being changed

Tie: changing from + to T Toggle insert mode: Ctrl+I remains the shortcut, but it's now the going to be real insert mode, not the weird undocumented buggy one it was in MU3 (this change is made in the other linked PR, not this one)

Shortcuts being removed

Toggle automatic placement (was =)

MarcSabatella avatar Sep 14 '22 15:09 MarcSabatella

I'll leave this with @bkunda

Tantacrul avatar Sep 14 '22 15:09 Tantacrul

Thanks for the concise summary @MarcSabatella. That all sounds exactly what I was expecting from this PR.

I did mention above that I think this is ready to be merged, and only flagged one issue with @Eism concerning the issue about "secondary keys" described here. In short, this issue is preventing the Shift key from working on QWERTZ keyboards.

If our devs don't have see this is as a major issue, then I'd suggest we go ahead and merge this, and raise the problem about QWERTZ keyboards separately.

Also adding @vpereverzev to this PR so we can be sure it gets triaged.

bkunda avatar Sep 19 '22 09:09 bkunda

I notice that we encoded some characters using their references, e.g. < is <. Uses of references vary by the shortcut file (keyboard layout). I tried experimenting by getting !, @, # to work by using their references only with no success.

@quinnouyang Yes, we should not use such characters in the shortcut file. And I have several PRs in which I fixed such shortcuts. So you need to replace + with Shift+=

Eism avatar Sep 19 '22 09:09 Eism

I notice that we encoded some characters using their references, e.g. < is <. Uses of references vary by the shortcut file (keyboard layout). I tried experimenting by getting !, @, # to work by using their references only with no success.

@quinnouyang Yes, we should not use such characters in the shortcut file. And I have several PRs in which I fixed such shortcuts. So you need to replace + with Shift+=

@quinnouyang please let me know when you've made this correction and I'll then re-test.

bkunda avatar Sep 19 '22 09:09 bkunda

@quinnouyang Rebase is needed

Eism avatar Sep 22 '22 09:09 Eism

@Eism I'm afraid the change from using + to Shift+= has worsened the user experience of this fix:

  • The regular + key on a numpad now no longer toggles the sharp accidental. This affects all users with a full-size keyboard
  • QWERTZ users have an even worse experience, because on these keyboards the + is a dedicated key. This means that these users won't be able to access toggles for neither sharps nor naturals (naturals didn't work in this fix anyway because of the requirement to use the Shift key, which I understood was a separate issue).

Is it absolutely essential we use Shift+= instead of +? I'm afraid I don't understand the technical reasons for this, but if we have to adopt this then I think we risk reducing the discoverability of this new shortcut action, especially for users with numpads.

bkunda avatar Sep 26 '22 08:09 bkunda

@bkunda Does '+' work for you on macOS?

The regular + key on a numpad now no longer toggles the sharp accidental. This affects all users with a full-size keyboard

We have problems with NumPad and should be solved in a separate PR For example, https://github.com/musescore/MuseScore/issues/12791

QWERTZ users have an even worse experience

Do we support QWERTY layout in MuseScore 4? Is there something I don't know? :)

Eism avatar Sep 26 '22 09:09 Eism

fwiw, You might be using the wrong names? Isn't Shift + = the same as +. When you say +, you might be meaning just = :)

HemantAntony avatar Sep 26 '22 09:09 HemantAntony

@bkunda Does '+' work for you on macOS?

The regular + key on a numpad now no longer toggles the sharp accidental. This affects all users with a full-size keyboard

We have problems with NumPad and should be solved in a separate PR For example, #12791

QWERTZ users have an even worse experience

Do we support QWERTY layout in MuseScore 4? Is there something I don't know? :)

@Eism + previously did work for me on macOS and on the numpad, before it was changed to Shift+=.

As for the QWERTZ layout, this was all working fine as well, with the exception of the new shortcut for toggle accidental: natural, which required the use of the Shift key. Apparently there is an issue with "secondary keys" (described here)

bkunda avatar Sep 26 '22 09:09 bkunda

fwiw, You might be using the wrong names? Isn't Shift + = the same as +. When you say +, you might be meaning just = :)

No when I refer to the + key I am literally referring to keys that only bear the symbol "+" (such as on a numpad), or on a QWERTZ keyboard, where the symbols "+" and "*" are on the same key.

(FWIW On a QWERTZ keyboard, = and 0 share the same key).

bkunda avatar Sep 26 '22 09:09 bkunda

@bkunda @quinnouyang Sorry, guys, my mistake It is should be + instead of Shift+=

Eism avatar Sep 26 '22 15:09 Eism

@bkunda @quinnouyang Sorry, guys, my mistake It is should be + instead of Shift+=

ok all good then. @quinnouyang if you can please revert to your previous solution I'll then quickly test And we can merge.

bkunda avatar Sep 26 '22 15:09 bkunda

Made a new commit because there was a rebase after the old one:)

quinnouyang avatar Sep 27 '22 02:09 quinnouyang

Thanks so much @quinnouyang. @Eism this works for me (Re-tested on QWERTY, QWERTZ, and AZERTY keyboards plus the numpad). Happy to merge.

bkunda avatar Sep 27 '22 07:09 bkunda