Focus transferred to toolbar after closing Inspector via "X" button
I run Windows 7 and Musescore 3.4.
My problem has to do with the concert pitch button being toggled on or off when I hit the space bar after closing the inspector.
To reproduce this, click on something on the score with the inspector open (this glitch usually occurs with fermatas for me). Then, click on the text field in the inspector where you edit the time stretch (or whatever). Then, without clicking elsewhere on the score, close the inspector by clicking the X. Finally, press the space bar. This should turn on or off concert pitch without you mouse being anywhere near the toggle button. If you press the space bar again, it begins playing the score like it normally should (making it more annoying to turn off).
This is obviously minor and specific, with plenty of workarounds. This just happens to come up a lot for me, and I would be grateful if it were fixed.
The issue I assume ios that you have transferred keyboard focus to the Inspector, then closed it using the mouse. so keyboard focus needs to go somewhere else. Currently it goes to the toolbar, as that is next in line in tab order, and I'm not sure there is anything to be done about that, although maybe it would be possible to detect that and send focus to the score instead. Closing it using the menu or keyboard shortciut is something we handle ourselves and does send focus where we want.
In reply to The issue I assume ios that… by Marc Sabatella
Yeah, I figured the issue was something like that. Will this be fixed though? It's a small thing for me to change if it won't be.
As I was trying to explain, I'm not sure it's possible or even advisable to change. As far as I know, it's normal and correct behavior that closing an open window should transfer focus to the next element in the tab order. And the score comes before, not after, the Inspector in the tab order. That's not something we'd want to change or else Tab from the score would not go to the Inspector any more. Perhaps it's somehow possible to intercept the "x" button and override the standard behavior, but I am not sure how. Maybe someone with more UI design experience can comment.
BTW, it's not just Space affected - because focus is on the toolbar, no shortcuts that are meant to be active in the score will function normally, only the usual keyboard UI navigation shortcuts like the arrow and Tab keys, Space, and Enter (the latter two activate the currently-selected control). This is as per usual UI design and accessibility guidelines. So, arrow keys will move the focus from button to button, Space or Enter will "press" the current button. Since Concert Pitch happens to be the button with focus, that's why Space presses it. Again, that's all normal, given that the toolbar has focus.
Anyhow, as mentioned, if you close the Inspector any way other than the "x", or if you simply press Esc, or click in the score, to explicitly return focus to the score, then Space and other shortcuts will function in the way you expect.