Forward keypresses from virtual keyboard to main window

• Feb 22, 2021 - 20:12

I am running musescore on linux and it is set up to have a focus-follows-mouse behavior. This means that any time I move my mouse into the virtual keyboard window, focus on the main window is lost. This means that any time I need to change the duration for the next note, I have to move the mouse to move focus back to the main window. Becuase there are not any keybindings (at least not that I know of) that are specific to the virtual keyboard, it would be much more convinient for keypresses to be forwarded to the main window any time they are sent to the virtual keyboard. Even if this is not possible, like if there are hotkeys I'm not aware of for the virtual keyboard itself, it would still be nice for at least the number keys to have the same behavior when the keyboard has focus as they do when the main window has focus.


In reply to by Marc Sabatella

No, that's not what I'm asking. Focus-follows-mouse is a setting in my window manager, and it is the behavior that I want, not only in musescore but also in my entire operating system. What I'm asking is for keyboard events to be forwarded from the keyboard to the main window (hence the title ;-)).

Not only is an annoying issue with the way musescore handles keyboard events not a reason to throw the baby out with the bath water and change the settings for my entire OS, but I'm not sure it would help anyway. Even if the focus didn't change when I hovered my mouse over the window, would it not still change when I click, like when I'm inputting a note into the score? And then I would have the same problem.

In reply to by pianocomposer321

Sorry, I've never used that option so I'm not really familiar with exactly how it works. I just know that I've never had a problem entering durations via keyboard when using the Piano Keyboard. Normally it does not "steal" focus at all, so there is no need for it to forward anything. So I am assuming that it is your OS and that setting that is somehow forcing all keyboard input to go to a window that was never designed to accept keyboard input to begin with. And disabling that option would restore the normal/correct behavior.

Probably there is some way to re-program this window to say, don't accept keyboard focus even when a user chooses an OS option that forces focus there. But I have no idea how that might work. Worth a suggestion to the issue tracker, though.

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