diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index c01ca10..36e3953 100755 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -22,6 +22,7 @@ ObxdAudioProcessorEditor::ObxdAudioProcessorEditor (ObxdAudioProcessor& ownerFil skins (processor.getSkinFiles()), banks (processor.getBankFiles()) { + // skinFolder = ownerFilter.getCurrentSkinFolder(); // initialized above commandManager.registerAllCommandsForTarget(this); commandManager.setFirstCommandTarget(this); @@ -39,7 +40,11 @@ ObxdAudioProcessorEditor::ObxdAudioProcessorEditor (ObxdAudioProcessor& ownerFil getTopLevelComponent()->addKeyListener (commandManager.getKeyMappings()); //Timer::callAfterDelay (100, [this] { this->grabKeyboardFocus(); }); // ensure that key presses are sent to the KeyPressTarget object - startTimer(100); +#if JUCE_WINDOWS + // No run timer to grab component on window +#else + startTimer(100); // This will fix the issue +#endif loadSkin (processor); repaint(); diff --git a/Source/PluginEditor.h b/Source/PluginEditor.h index a8bb5c3..586ee8c 100755 --- a/Source/PluginEditor.h +++ b/Source/PluginEditor.h @@ -100,11 +100,13 @@ public: case KeyPressCommandIDs::buttonNextProgram: case KeyPressCommandIDs::buttonPadNextProgram: nextProgram(); + grabKeyboardFocus(); break; case KeyPressCommandIDs::buttonPrevProgram: case KeyPressCommandIDs::buttonPadPrevProgram: prevProgram(); + grabKeyboardFocus(); break; default: return false;