VST Plugin Still Not Getting Keystrokes

Just installed and tested… Same problem in Live 9.

  • Bram

Hey Jules,

any updates on this?

  • bram

bump

fearless leader, any updates? :-/

  • bram

I second the bump

Just removed all my modal dialogs with text input and made some fake dialogs on the plugin component. Finally i ended up here as many others. I really hope that there will be a fix for this soon.

Edit: Is there a work around that still works with the latest tip?

As expected, this was a total pain-in-the-ass, but I’ve just checked something in that seems to work now. Please let me know how it goes.

Thanks Jules, but it’s not working in Cubase 7. A handful of characters get through–the digit ‘0’, a few punctuations, the letters ‘w’, ‘v’, ‘u’, and perhaps a couple others. But even when the text editor has focus, that focus is immediately lost when any offending character is entered. I have copies of some old plugs I wrote under pre 2.0 versions of Juce and they handle all character input without difficulty. Sorry about the P.I.T.A. part.

Sorry, should have said: I only enabled it for Live because that’s what I was testing in… Did you try changing the bit where it says:

if (PluginHostType().isAbletonLive()) registerKeyboardHook();

Although for cubase it might need solving in an entirely different way.

I missed that part. I’ll give it a try a bit later today. Thanks!

I tried [color=#0000FF]registerKeyboardHook()[/color]; with Cubase 7. Sorry but it didn’t work.

I’ll also give it a spin in Cubase 5 and 7. I’ll let you know the results too.

  • bram

Hi Jules,
i can feel your pain!!!

I do not know much about that keystroke issue, but i’m not sure if this is something that should be fixed for specific hosts.

I’m having following issues (above fix not included):
The SPACE key does not work in Windows Reaper (other keys work). Reaper does its default behavior instead and starts playing the song. The same happens with the AU version in Reaper OSX. OSX VST works and its possible to enter SPACE’s into the TextEditor. 32bit plugins / 32bit reaper host

Can someone reproduce this too?

Almost certainly impossible to do anything about that from the plugin’s side. If the host has added a keyboard hook to catch all key events, there’s no way we can tell it when we’re using the keypresses and when we’re not.

Edited the code like this:

            //if (PluginHostType().isAbletonLive())
                registerKeyboardHook();

Tested in Cubase 5 64bit and Cubase 7 64 bit, no luck in either host…

Almost certainly impossible to do anything about that from the plugin’s side. If the host has added a keyboard hook to catch all key events, there’s no way we can tell it when we’re using the keypresses and when we’re not.[/quote]

To me the question is: if it is possible to make a VST plugin with (say) VST-GUI which do what they are supposed to do in Reaper… Jules, wouldn’t it be good to have a quick look at VST GUI and see how they get keyboard input? The source is open ( vstgui download | SourceForge.net ) so wouldn’t that be the easiest way? Last time I looked VST GUI wasn’t that huge so you could probably find it very quickly.

  • bram

I’ve looked at VSTGUI before, and they do exactly the same thing that I’ve done. They catch all the standard WM_KEYDOWN messages, and have the same message-intercepting trick that I just added for Ableton, so I really don’t know. Maybe there’s something subtle hidden away in there, but I can’t find it.

What if we ask some of the Steinberg people to look at this? It would be in their interest too…
Same goes for the other hosts (i.e. the Reaper error).

  • bram

[quote=“patrickkunz”]Hi Jules,
i can feel your pain!!!

I do not know much about that keystroke issue, but i’m not sure if this is something that should be fixed for specific hosts.

I’m having following issues (above fix not included):
The SPACE key does not work in Windows Reaper (other keys work). Reaper does its default behavior instead and starts playing the song. The same happens with the AU version in Reaper OSX. OSX VST works and its possible to enter SPACE’s into the TextEditor. 32bit plugins / 32bit reaper host

Can someone reproduce this too?[/quote]
Just checked a 64bit plugin from us in 64bit Reaper on Windows 7 and we get the Space key, based on the latest JUCE 1.x release (was it JUCE 1.4?) But we do a dirty trick, using <addToDesktop(juce::ComponentPeer::windowIsTemporary);> when our text editor gains the focus - see also my old post on this in this thread. It seems to work on almost all hosts, as people need this to insert their license keys, and we rarely get complaints (I think it still does not work in some host from Magix and in MuLab).

Almost certainly impossible to do anything about that from the plugin’s side. If the host has added a keyboard hook to catch all key events, there’s no way we can tell it when we’re using the keypresses and when we’re not.[/quote]

I just figured out that there is a Send all Keyboard Input to Plugin option in reaper. In the floating window mode: a right click on the top of the plugin window shows the context menu. Otherwise a right click on the plugin name on the left. Its not user friendly and i think most users do not know about that feature, but its there and maybe a useful work around. It seems that other hosts like Cakewalk Sonar has this option too…

Almost certainly impossible to do anything about that from the plugin’s side. If the host has added a keyboard hook to catch all key events, there’s no way we can tell it when we’re using the keypresses and when we’re not.[/quote]

I just figured out that there is a Send all Keyboard Input to Plugin option in reaper. In the floating window mode: a right click on the top of the plugin window shows the context menu. Otherwise a right click on the plugin name on the left. Its not user friendly and i think most users do not know about that feature, but its there and maybe a useful work around. It seems that other hosts like Cakewalk Sonar has this option too…[/quote]
Yes, there is something like this in Sonar, too:

Note that for our solution with , it is not necessary to tick the Send all Keyboard Input to Plugin option in Reaper.

Thanks for the info. I’ll try this.

Edit: its a massive hack. You can feel that is something wrong with the modified Text Input box :slight_smile: But its good enough for entering the serial. It works for Reaper with the latest tip too.
Edit2: You have to exclude ableton. Otherwise you get 4 times the same character together with the fix jules made for ableton.

Dont know if its worth the risk. This modal box feels heavy. Its slow when you click into it the first time and it flickers. But it works almost with every host.