I’m trying to get text entry to work in my JUCE based audio plug-in, but I’m having some difficulty with it - please can anyone help.
I can’t use TextEditor controls, as the text entry box needs to display over an OpenGL surface, so I’m wanting to make my own Component class, which will display the text in the correct place on the OpenGLComponent. The display of the text is fine, but now I’m trying to get it to accept keyboard input. I’ve tried putting in a lot of the code from the TextEditor class. I have called setWantsKeyboardFocus( true ); and I have JucePlugin_EditorRequiresKeyboardFocus set to 1. When I mouse click the control I get a focusGained call through and I’ve tried putting in the peer->textInputRequired call from TextEditor.
But, no matter what I try I never seem to get any calls to keyPressed coming through.
To try to figure out what I’d done wrong, I built JuceDemoPlugin, and added the line gainLabel.setEditable( true );. Now when I click on the gainLabel in the JuceDemoPlugin, it shows the text for the gainLabel as if I’m about to edit it, and the flashing caret, etc. But, although I see the focusGained call come through in the debugger, again, I never get any keyPressed calls.
I am using the latest tip (1.54.27), and am testing in Windows 7 in Ableton Live 8.
Please can anyone suggest what I’m doing wrong?