Keyboard focus in RTAS plugin


#1

I just upgraded my RTAS plugin from Juce 1.46 to the latest svn tip and it seems to have introduced a bug whereby the PT keyboard commands stop working, e.g. Play/Stop. These always worked before regardless of whether the plugin window had focus. JucePlugin_EditorRequiresKeyboardFocus has been set to 1 in both versions of the plugin.

Any ideas how to fix this?

Steve


#2

…and I see a lot of changes to the keyboard focus code in the RTAS wrapper. Hmmm. I’m betting there’s a bug here.


#3

Currently there seems to be no workaround for this - the only solution on Mac seems to be to disallow keyboard input to the plugin completely. See this topic for a few more pointers.

Best,
(a)


#4

Hello (a),

How do you ‘disallow keyboard input to the plugin completely’ ?

I’ve set JucePlugin_EditorRequiresKeyboardFocus to 0 in JucePluginCharacteristics.h , then also tried setWantsKeyboardFocus(false); in the constructor, but my plugin still steal key even in digital performer.

I guess this has to be done somewhere else ?

Thanks,

Salvator


#5

That did the trick for me in Pro Tools…

Cheers,
Alexander


#6

Try using this method in JucePluginCharacteristics

virtual bool KeyListener::keyPressed (  const KeyPress &  key,  Component *  originatingComponent )  [pure virtual] 

This method should get called , don’t do anything in there just return true. I have never tried it myself you can give it a shot.


#7

Hi vishvesh,

I’m not sure to understand you.

In JucePluginCharacteristics I only see #defines … are you sure it should be used there ?
I’d be interested by an example on how, where and why you would implement that function…
Is that to get key event back to the individual childs components ?

So far I tried the JucePlugin_EditorRequiresKeyboardFocus 0 for RTAS that allowed to use the PT shortcut again.

Though the problem still is there with AU in Digital Performer, and also it lose the useful ability to i.e. enter value in slider.

Thanks,

Salvator


#8

[quote=“vishvesh”]Try using this method in JucePluginCharacteristics

virtual bool KeyListener::keyPressed (  const KeyPress &  key,  Component *  originatingComponent )  [pure virtual] 

This method should get called , don’t do anything in there just return true. I have never tried it myself you can give it a shot.[/quote]

I don’t really see how this method would have any impact on keyboard focus?

Best,
Alexander


#9

I need to apologies for the post :oops: , I didn’t put it correctly in there, What I actually meant was to adding that method in content component which hold all the other component.

But even that is of no use, since you need certain components to receive key board focus.