Grabbing keyboard focus from popup window

I am developing a simple DAW with the Tracktion engine, and I’m running into an issue with keyboard focus and plugin windows right now. We’re using pop-up DocumentWindows for plugin views that are separate from the main UI hierarchy, but we want the main view to hold keyboard focus (like Ableton). I have tried calling setMouseClickGrabsKeyboardFocus (false) in the constructor for the DocumentWindow and the Component itself, but that doesn’t seem to do anything. Anytime we have to adjust something in the plugin window, keyboard focus is taken away from the main view.

It seems like calling grabKeyboardFocus immediately after opening the plugin window works until we have to click on the plugin. Is there any way to ensure the keyboard focus stays on the main view? I’m looking at calling grabKeyboardFocus in a focusLost call, but that seems like a bad idea. Does anyone have any suggestions?

I need the exact opposite help lol. I can’t stop Steinberg Nuendo from stealing keystrokes so users can edit the values of each knob in my hover-overs. I’ve been stuck for days, 18 to 20hrs/day, and nothing I so seems to allow my editable field to capture the numbers. Nuendo just steals all, but a few random letters, backspace, return, and delete. I’m losing my mind.

I can tell you as someone who’s been an audio engineer for over 20yrs that, when a plugin is open, the only key I need feeding to the DAW is space bar. Other than that, when I want the mixer/editor window, I usually go to those windows. I might leave a plugin open if I’m manually writing automation, but in that case, I’m clicking around the editor, and the plugins fall to the background (in terms of selection).

EDIT:
On second thought, I see the commands you attempted. You’re saying you can’t get keys to feed to the DAW, even when you click elements of the DAW?

No, keys will feed to the DAW if we click on it. As soon as we click on the plugin though, keys stop feeding to the DAW. Ideally, we want at least the space bar and the keys we are using for MIDI playback to feed to the DAW so that users can adjust parameters on an instrument or sound, then play the track or play the instrument itself to test the sound.

We are implementing a couple “custom” plugins (actually just GUI wrappers for Tracktion plugins), but we don’t plan on adding any key listening functionality for the plugins, so there’s no need for them to be listening for keys at all.

Oh, I forgot about using keys for MIDI. I’ve just been so spoiled working in a dream studio and my clients pretty much all have MIDI instruments, but I guess it makes sense that there are likely a lot of people out there who still don’t have dedicated MIDI keyboard/pads that you gotta keep in mind. Either way, even while saying how non-essential it is, I still mentioned the importance of spacebar/play. So, yeah, you gotta at least have spacebar. I work at a hybrid immersive console all day mixing artist’s song and I still hit spacebar a lot, even with a play button in front of me. It just depends on where my hands are at the time. So, spacebar = play is a must-have