Menu mnemonics A-G create note in note input mode

• Mar 14, 2016 - 08:20
Type
Functional
Severity
S4 - Minor
Status
closed
Regression
No
Workaround
Yes
Project

It is a matter in German UI. Do ALt+D, A (for save as). If you are not in note writingmodus it happens nothing. If you are in notewritingmodus the score will be added a note a. But the dialogue for saving do not appear.


Comments

I have occasionally, more than once, seen my keystroke entered a note typed into a score while I was typing text into the "Upload Score" dialog. This is profoundly disturbing when it happens, and it doesn't keep on happening.

Status PR created fixed

Fixed in branch master, commit 2d428460eb

_fix #101991 Ignore score command shortcuts in menus

Previously, certain keyboard shortcuts were active in menus when they
shouldn't be. For example, pressing the letter keys A to G while inside
a menu would cause notes to be added to the score, and S would add a slur.
This was problematic because letter keys are traditionally used to open
menu items (e.g. pressing A in the Help menu should open the About dialog).

This commit prevents unwanted edits from the menus by terminating the edit
operation if the score does not have focus. The shortcut is still active,
however, so this commit DOES NOT restore the traditional behaviour where
pressing letter keys opens menu items. As such, this is a quick fix rather
than a long-term solution. An investigation showed that a better solution
is not possible without significant changes to the shortcut system.

See description in PR #5890 for commentary on various potential ways to solve
this issue that were investigated and rejected in favor of this quick fix._

Status active PR created

Aren't those mnemonics supposed to require the Alt key? Like Alt+H,Alt+A for Help > About?
That seems to work with https://github.com/musescore/MuseScore/pull/5982
Alt+H,A though does not (any longer), but I guess that is a good thing and the whole point of this issue, isn't it?

Strange: Alt+F,Alt+A for File > Save As.... does not, but Alt+D,Alt+A in the German version for Datei > Speichern als... does (in 3.4.2). Might be something I once did via the translation though

I don't know about what is "supposed" to happen, but I personally don't expect to need Alt for mnemonics within menus. Alt+H to open help, yes, but then just "A" should take me to About. It's like that in most other programs.

Anyhow, the PR does seem to work as advertised as far as I can tell. If you are not in note input, nothing changes. After opening a menu. A-G didn't do anything before, they continue to do nothing now. Other keys worked before, they continue to work now. If on the other hand you are in note input mode when you open the menu, A-G previously entered notes into the score. Now they do nothing, just as is the case in normal mode. And other mnemonics continue to work.

Meanwhile, the voice buttons appear to work fine too. But I never used a build that had that bug, so I'm not sure if there was some specific thing I needed to do to trigger that problem.

Well, Alt+H, A does not work for me in that build, not in note entry mode nor outside. Alt+H, Alt+A does in either mode. Alt+H, O though does work too, in either mode (as does Alt+H, Alt+O)

That's what I said :-). With a menu open A-G does nothing in that build, whether you are in note input mode or not. Thus, partially fixes the bug that caused A-G to enter a note into your score if you were in note input mode when you opened the menu. And as I said, other keys continue to work fine: Alt+H followed by M or whatever will invoke that menu command whether you are in note input mode or not.

Well, no, it's definitely not ideal, as mentioned in the PR comment. But it's better than current. I'd rather have A-G do nothing than do the wrong thing.

Status PR created fixed

Fixed in branch master, commit dbb79fad3e

_fix #101991 Ignore shortcuts in menus +collect_artifacts

Slightly better fix than originally attempted in PR #5890. This time
editing is terminated if the main window does not have focus, which
means that it is safe to use toolbar buttons that take focus away from
the score, such as the buttons for Voices 1 to 4.

As with PR #5890, these changes do not allow letter keys to open menu
items. That would require substantial changes to the shortcut system
as discussed in PR #5890._

Fixed in branch master, commit 80644a7255

_fix #101991, fix #304586: fix menu mnemonics colliding with note input shortcuts

This commit reverts dbb79fad3e0df676556aa737a65fd39fada84f6e to avoid
interfering with cmd() invokations made not by pressing a letter key
in menu (e.g. from a Piano Roll Editor window). The solution applied
in this commit also makes menu mnemonics actually working thus
restoring their expected behavior._

Fix version
3.5.0