VST plugin isn't getting keystrokes

Hi Jules,

Are you going to put zamrate’s changes (nice job, zamrate!) into the main Juce source tree?

Pete

yes, will do. I’m just working on those classes at the moment.

Very cool. :slight_smile:

Hello Jules, any update on that? I am using the latest Git tip of Jules. My VST plugin does not get any keystrokes in its in Ableton Live 6.0.11 and Live 8.1.4. We used wxWidgets before (and evaluating if we should switch to JUCE right now), and our VST plugins that are made with wxWidgets get key strokes, even in Live 6. The behavior there is perfect for us: Whenever the user clicks in a textbox, keystrokes are handled by the plugin and ignored by the host, otherwise they are handled by the host, even if the plugin window is opened.

I didn’t add those changes, but this thread is pretty old and I can’t remember the reason why… There could have been a good reason not to add them…!

That’s really odd that you say a wxWidgets window gets the keypresses and a juce one doesn’t, as I’d expect them to be pretty much the same structure… Assuming that the wxWidgets code isn’t doing anything VST-specific to get the events, then there must just be a minor difference in the way the windowing is set up which makes the difference… Which OS this is?

I just checked with Windows XP.

In the wxWidgets version, we are handling windows pretty much on our own, getting a native Window handle… which is the main reason why we might switch to JUCE, because this gave us much trouble to handle correctly in all hosts, especially on Mac, and still does not work correctly everywhere.

In regards to VST: We wrote a little wrapper around Steinbergs VST 2.4, but we did not introduce anything specific to keystrokes.

Well if your wxWidgets window can get the keystrokes, it can’t be anything difficult…

zamrate’s fix will probably work, but I think it’d be better to find a way for the OS to deliver the events directly, as the VST stuff probably doesn’t handle unicode symbols or strange keyboards very well. I wonder what your code is doing that mine isn’t…?

When hitting a key inside a wxWidgets wxTextCtrl in Live on Windows XP, this is where the entry point is (we are not getting it via the VST api):

// Main window proc
LRESULT WXDLLEXPORT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    ..
}

Hey Jules, any news here? This is a real show-stopper for us, so we are currently postponing all plugin development with JUCE and are hungry for a fix.

We also wonder what other plugin developers are doing to fix this?

Sorry, haven’t been spending much time in the plugin code recently! I’ll try to take a look asap.

bump :>
any news about this?

The thread is over 6 months old, things may have changed hugely since this - I can’t remember!

Sorry to dig up an old thread.  But, I've got a keystrokes problem in Ableton 9 on the PC.  Did anything ever get put into the main code base?  I've ticked the 'gimme keystrokes' box in the introjucer. 

If I have to I'll put one of the many hacks here in, but it'd be nice to know I've just missed something and it's all sorted in Juce for me somewhere :)

cheers! J. 

(EDIT: Zamrate's patches appear to work fine, and so far no side-effects ... more testing to do)

Zamrate's patch kind of works, but in Cubase none of the non-alpha-numeric keys work, such as "." and "-".  For my needs that's not a usable solution.  Anyhow, there's no solution included with Juce, although people have posted many work arounds.  This thread has more info:

http://www.juce.com/forum/topic/vst-plugin-still-not-getting-keystrokes

-Chris

Chris, thanks: 

I went with Zamrate's patch for now.  Having looked at the VST specification as well it looks like the right solution. However I'd rather not be patching the Juce framework.

Has anyone had any problems with the Zamrate solution?  I have a report that the space bar is being handled unnecessarily by the plugin, but I figure I can solve that.

By the way, does any one know if VST3 addresses these sorts of issues?  Or is the keyboard handling basically the same?  I skimmed the VST3 SDK and didn't see an obvious answer.  But the VST GUI TextEdit class included with VST3 looked about the same as VST2, so I guess it won't any different.