Digital Performer no key focus



Anyone figured a solution regarding the keyboard focus issue with DP, even the simple spacebar tranport control is not working. All other hosts seem fine such as logic, live, reaper,cubase.



A solution ?


This is an old post - may have been fixed since then…


Key presses work fine in DP7 when using a Cocoa interface, but not when using a Carbon one. Unfortunately, if you support both interfaces - which you no doubt do if you are using the JUCE framework - DP7 currently favours the crusty old Carbon UI over the Cocoa one. There is no way to tell DP to use Cocoa over Carbon. I did make MOTU support aware of this, so perhaps a future update will use the more modern UI over the legacy one, but who knows? Assuming DP will eventually go 64-bit, they will be forced to switch to Cocoa.

My work-around was to add a configuration option so that users of our plug-ins could disable the Carbon UI completely, which forces DP7 to use the Cocoa interface. An absolute honker of a kludge, I will admit, but I couldn’t think of a better solution other than waiting for MOTU to update their host. (As an aside, UI resizing also works fine in DP7 with the Cocoa UI, but not the Carbon one.)


It’s not such a bad kludge, really - the old hosts that only support Carbon UIs must be getting near the end of their lifespan by now, I hope!


I’ve been asked to elaborate on how I programmatically disabled the Carbon AU Interface. It’s very straight-forward: in, you’ll need to amend GetNumCustomUIComponents to return 0 instead of 1. In my case I do this programatically, returning 1 in most cases, and 0 if Carbon AU interfaces have been disabled by a configuration file setting.


Good tip thanks !

I asked Jules about adding Digital Performer in getHostType()
Once this is implemented, I would edit and add this just under #include “…/juce_PluginHostType.h”

static PluginHostType& getHostType() { static PluginHostType hostType; return hostType; }
then modify GetNumCustomUIComponents() like this :

[code] int GetNumCustomUIComponents() {
bool useCarbonUI;

            if (getHostType().isDigitalPerformer())
                useCarbonUI = false  ;                    
                useCarbonUI = true;
return       useCarbonUI; 

Works great here after adding DP in getHostType())



Thanks! Keep it simple though…

int GetNumCustomUIComponents() { return PluginHostType().isDigitalPerformer() ? 0 : 1; }

…would work just as well!