Yeah, because we don't actually get calls for every key that's pressed.Trancit wrote:I am not a programmer (obviously)... so this was a good guess... but sorry:dRowAudio wrote:I've never heard that before...Trancit wrote:This shouldn´t be neither very difficult nor very time intense...
Is it hard work to i.e. tell your plugin wrapper to block/reserve it for the host the spacebar and translate shift+spacebar for the plugin as spacebar instead???
When you load a plugin, it has its own kind on window and if it's the foreground it will get all key presses.
What's supposed to happen is that if the plugin window doesn't need that key press (e.g. because it doesn't have a label active or similar), it just passes the key press on up the hierarchy to our window and we can deal with it, knowing that it should be used to start/stop the transport.
If the plugin window consumes that key press, even if it doesn't use it, we have no way of knowing that a key was ever pressed.
What I imagine other hosts do, it constantly re-grab keyboard focus from the plugin. This could be an equal pain as it means you wouldn't be able to type in a value to a text box or use arrow keys to nudge the last control that was touched etc.
The plugin should be an extension of the host, and as such work in the same way that other windows do, not stealing key presses that they have no interest in.
(As a slight aside, there might be a way to add OS-level hooks to try and intercept all key presses to a window but this would be incredibly hacky, not to mention time consuming. Remember everything we do that's platform specific has to be done and tested across Windows, Mac and half a dozen Linux variants. With this solution, you'd get equally dodgy behaviour if you, for example were trying to type a name in a plugin text box with spaces in, it would continually start and stop the host playback).
For well behaved plugins (which in my experience is at least most of the big-name companies) this isn't an issue. They deal with key presses correctly. There's no way I'm going to be able to get clearance to research, implement, debug, test, deploy and test this again. This could easily be 3 weeks of dev time...
