Hello!
So I’m developing an Instrument plugin that takes in MIDI input, passes it through a Hosted Synth, and then outputs the sound from the hosted synth. I have a button in my plugin which opens the Hosted Synth in a separate DocumentWindow window.
I have overridden the keyPressed function in my plugin to take in keystrokes, to act as a “Musical Typing” sort of feature. This works when my plugin is in focus, which is understandable.
But when I open the hosted synth window, the keyboard focus immediately transfers to that window. Even if I set “setWantsKeyboardFocus(false)” or “giveAwayKeyboardFocus()”, the focus still goes to this window instead of staying with my plugin.
Is there anything I can do besides the above to retain the keyboard focus with my plugin?
The reason I want this is so that the user can still use the “Musical Typing” feature in my plugin with the hosted plugin window open.
Any help in this matter is much appreciated!
Thanks in advance!
