in your manual stand this
If MUX have such code wy it fail in rapidcomposer ?. do the DAW developer too need add some code that space handling work good ?Generally operating systems send key presses to the focused control in the focused window. When that control does not handle that key press it should forward it to the next keyboard handler, eg. its parent control. If all controls properly follow this rule, all will work fine as the user can indicate which control must have keyboard focus.
But when using VST plug-ins it occurs that the VST plug-in editor does not properly forward unhandled keyboard events and this may result in, for example, that while the keyboard focus is on the plug-in editor, pressing the spacebar does not start/stop the main Play function. And besides that, there also is a non-comformity in Microsoft Windows: When a child window (the very VST editor) does report that a key press is unused and hence it gives the key message to DefWindowProc, Windows does not forward it to the parent window. That's a serious shortcoming in the Windows system. MuLab cannot do much about these cases except for this workaround: When you click the top control bar of a VST editor (thus in the MuTools GUI area) this will shift the GUI focus to the window's top level and hence key presses will be processed by MuLab. So that way you can quickly force a GUI focus shift to the MuLab GUI and hence eg pressing the spacebar will start/stop playing the composition.
Request to Windows VST plug-in developers:
To workaround that shortcoming in Windows OS, please do this in your VST editor's window message function (pseudo code):
case WM_KEYDOWN:
case WM_KEYUP:
if (ProcessKey(Msg,wParam,lParam)) { // ProcessKey() forwards it to the relevant control in your UI and when they key is handled = consumed, it returns true
return(0);
}
else {
host_hwnd=(HWND)AEffEditor->systemWindow;
return(CallWindowProc((WNDPROC)GetWindowLongPtr(host_hwnd,GWLP_WNDPROC),host_hwnd,Msg,wParam,lParam));
}
Using the above code (ie. the 'else' section) not only the unprocessed key messages in the main VST editor window are properly forwarded to the host window, even unprocessed key messages of separate plugin windows (if any) are forwarded to the host window. That's a double advantage.