ArrayArrayArrayArrayArrayArrayArrayArray BrainModular BrainModular Users Forum 2022-06-01T13:12:36+02:00 https://brainmodular.com/forums/app.php/feed/topic/6995 2022-06-01T13:12:36+02:00 2022-06-01T13:12:36+02:00 https://brainmodular.com/forums/viewtopic.php?t=6995&p=44107#p44107 <![CDATA[Re: eed to send computer Keyboard shortcut to VST . how ?]]> You can use a windows call to bring a window into and out of focus using SetForegroundWindow(hWnd)
and ShowWindow(hWnd, SW_MINIMIZE);

If the VST supports it, the best idea would be to map the function to a midi CC message or automation control
and use that.

Statistics: Posted by sm_jamieson — 01 Jun 2022, 13:12


]]>
2022-06-01T13:03:56+02:00 2022-06-01T13:03:56+02:00 https://brainmodular.com/forums/viewtopic.php?t=6995&p=44106#p44106 <![CDATA[Re: eed to send computer Keyboard shortcut to VST . how ?]]>
1. Use SendInput to send to currently active window (creates key events as if typed)

example from google:

void keyPressTilde() {

ip.ki.wVk = 0xC0; // virtual-key code for the key
ip.ki.dwFlags = 0;
SendInput(1, &ip, sizeof(INPUT));

ip.ki.dwFlags = KEYEVENTF_KEYUP; // KEYEVENTF_KEYUP for key release
SendInput(1, &ip, sizeof(INPUT));
};

2. Use SendMessage to send key events to any windows (can be in background).
This only works if the application (VST) gets input by the messaging system and modifiers
may not work, since they are often obtained using the global key states not the messages.
It might work if a simple keypress is required.

e.g.

int main()
{
LPCWSTR Target_window_Name = TEXT("Untitled - Notepad"); //<- Has to match window name
HWND hWindowHandle = FindWindow(NULL, Target_window_Name);
HWND EditClass = FindWindowEx(hWindowHandle, NULL, L"Edit", NULL);

SendMessage(EditClass, WM_KEYDOWN, 0x5A, 0x002C0001);
SendMessage(EditClass, WM_CHAR, 0x7A, 0x002C0001); //"z"
SendMessage(EditClass, WM_KEYUP, 0x5A, 0xC02C0001);

return(0);
}

Statistics: Posted by sm_jamieson — 01 Jun 2022, 13:03


]]>
2022-06-01T10:35:48+02:00 2022-06-01T10:35:48+02:00 https://brainmodular.com/forums/viewtopic.php?t=6995&p=44103#p44103 <![CDATA[Re: eed to send computer Keyboard shortcut to VST . how ?]]> It might also depend on exactly how the VST window gets its input events.
Might need a new SDK function to get the window handle from Usine.
Also needs to support the 2 modes now - the original VST window and the new VST Client window
(The Client window gets around the problem where VST windows were getting stuck under other windows)

I did some experiments with this a few years ago. I'll see if I can dig out the code.

Statistics: Posted by sm_jamieson — 01 Jun 2022, 10:35


]]>
2022-05-26T01:16:35+02:00 2022-05-26T01:16:35+02:00 https://brainmodular.com/forums/viewtopic.php?t=6995&p=44096#p44096 <![CDATA[Re: eed to send computer Keyboard shortcut to VST . how ?]]>
Windows can send key events to another window using C++. I expect MAC can do similar.
This could be done in a user module using the SDK.
Google this for examples: "windows send keystrokes to application c++

Usine should be able to provide the window handle for the VST window.
So I think a Send Key to VST module should be possible.

Simon.
i could not figure that part out

Statistics: Posted by GenCode — 26 May 2022, 01:16


]]>
2022-05-25T11:03:47+02:00 2022-05-25T11:03:47+02:00 https://brainmodular.com/forums/viewtopic.php?t=6995&p=44095#p44095 <![CDATA[Re: eed to send computer Keyboard shortcut to VST . how ?]]> This could be done in a user module using the SDK.
Google this for examples: "windows send keystrokes to application c++

Usine should be able to provide the window handle for the VST window.
So I think a Send Key to VST module should be possible.

Simon.

Statistics: Posted by sm_jamieson — 25 May 2022, 11:03


]]>
2022-05-20T14:29:37+02:00 2022-05-20T14:29:37+02:00 https://brainmodular.com/forums/viewtopic.php?t=6995&p=44090#p44090 <![CDATA[Re: eed to send computer Keyboard shortcut to VST . how ?]]> Statistics: Posted by GenCode — 20 May 2022, 14:29


]]>
2022-05-20T13:47:49+02:00 2022-05-20T13:47:49+02:00 https://brainmodular.com/forums/viewtopic.php?t=6995&p=44089#p44089 <![CDATA[Re: eed to send computer Keyboard shortcut to VST . how ?]]> I don't think it's possible in the general case. Keyboard handling is provided by the VST itself and unfortunately Usine can't hook that.

Statistics: Posted by senso — 20 May 2022, 13:47


]]>
2022-05-20T11:59:02+02:00 2022-05-20T11:59:02+02:00 https://brainmodular.com/forums/viewtopic.php?t=6995&p=44084#p44084 <![CDATA[eed to send computer Keyboard shortcut to VST . how ?]]>
Thank you
GC

Statistics: Posted by GenCode — 20 May 2022, 11:59


]]>
BrainModular BrainModular Users Forum 2022-06-01T13:12:36+02:00 https://brainmodular.com/forums/app.php/feed/topic/6995 2022-06-01T13:12:36+02:00 2022-06-01T13:12:36+02:00 https://brainmodular.com/forums/viewtopic.php?t=6995&p=44107#p44107 <![CDATA[Re: eed to send computer Keyboard shortcut to VST . how ?]]> You can use a windows call to bring a window into and out of focus using SetForegroundWindow(hWnd)
and ShowWindow(hWnd, SW_MINIMIZE);

If the VST supports it, the best idea would be to map the function to a midi CC message or automation control
and use that.

Statistics: Posted by sm_jamieson — 01 Jun 2022, 13:12


]]>
2022-06-01T13:03:56+02:00 2022-06-01T13:03:56+02:00 https://brainmodular.com/forums/viewtopic.php?t=6995&p=44106#p44106 <![CDATA[Re: eed to send computer Keyboard shortcut to VST . how ?]]>
1. Use SendInput to send to currently active window (creates key events as if typed)

example from google:

void keyPressTilde() {

ip.ki.wVk = 0xC0; // virtual-key code for the key
ip.ki.dwFlags = 0;
SendInput(1, &ip, sizeof(INPUT));

ip.ki.dwFlags = KEYEVENTF_KEYUP; // KEYEVENTF_KEYUP for key release
SendInput(1, &ip, sizeof(INPUT));
};

2. Use SendMessage to send key events to any windows (can be in background).
This only works if the application (VST) gets input by the messaging system and modifiers
may not work, since they are often obtained using the global key states not the messages.
It might work if a simple keypress is required.

e.g.

int main()
{
LPCWSTR Target_window_Name = TEXT("Untitled - Notepad"); //<- Has to match window name
HWND hWindowHandle = FindWindow(NULL, Target_window_Name);
HWND EditClass = FindWindowEx(hWindowHandle, NULL, L"Edit", NULL);

SendMessage(EditClass, WM_KEYDOWN, 0x5A, 0x002C0001);
SendMessage(EditClass, WM_CHAR, 0x7A, 0x002C0001); //"z"
SendMessage(EditClass, WM_KEYUP, 0x5A, 0xC02C0001);

return(0);
}

Statistics: Posted by sm_jamieson — 01 Jun 2022, 13:03


]]>
2022-06-01T10:35:48+02:00 2022-06-01T10:35:48+02:00 https://brainmodular.com/forums/viewtopic.php?t=6995&p=44103#p44103 <![CDATA[Re: eed to send computer Keyboard shortcut to VST . how ?]]> It might also depend on exactly how the VST window gets its input events.
Might need a new SDK function to get the window handle from Usine.
Also needs to support the 2 modes now - the original VST window and the new VST Client window
(The Client window gets around the problem where VST windows were getting stuck under other windows)

I did some experiments with this a few years ago. I'll see if I can dig out the code.

Statistics: Posted by sm_jamieson — 01 Jun 2022, 10:35


]]>
2022-05-26T01:16:35+02:00 2022-05-26T01:16:35+02:00 https://brainmodular.com/forums/viewtopic.php?t=6995&p=44096#p44096 <![CDATA[Re: eed to send computer Keyboard shortcut to VST . how ?]]>
Windows can send key events to another window using C++. I expect MAC can do similar.
This could be done in a user module using the SDK.
Google this for examples: "windows send keystrokes to application c++

Usine should be able to provide the window handle for the VST window.
So I think a Send Key to VST module should be possible.

Simon.
i could not figure that part out

Statistics: Posted by GenCode — 26 May 2022, 01:16


]]>
2022-05-25T11:03:47+02:00 2022-05-25T11:03:47+02:00 https://brainmodular.com/forums/viewtopic.php?t=6995&p=44095#p44095 <![CDATA[Re: eed to send computer Keyboard shortcut to VST . how ?]]> This could be done in a user module using the SDK.
Google this for examples: "windows send keystrokes to application c++

Usine should be able to provide the window handle for the VST window.
So I think a Send Key to VST module should be possible.

Simon.

Statistics: Posted by sm_jamieson — 25 May 2022, 11:03


]]>
2022-05-20T14:29:37+02:00 2022-05-20T14:29:37+02:00 https://brainmodular.com/forums/viewtopic.php?t=6995&p=44090#p44090 <![CDATA[Re: eed to send computer Keyboard shortcut to VST . how ?]]> Statistics: Posted by GenCode — 20 May 2022, 14:29


]]>
2022-05-20T13:47:49+02:00 2022-05-20T13:47:49+02:00 https://brainmodular.com/forums/viewtopic.php?t=6995&p=44089#p44089 <![CDATA[Re: eed to send computer Keyboard shortcut to VST . how ?]]> I don't think it's possible in the general case. Keyboard handling is provided by the VST itself and unfortunately Usine can't hook that.

Statistics: Posted by senso — 20 May 2022, 13:47


]]>
2022-05-20T11:59:02+02:00 2022-05-20T11:59:02+02:00 https://brainmodular.com/forums/viewtopic.php?t=6995&p=44084#p44084 <![CDATA[eed to send computer Keyboard shortcut to VST . how ?]]>
Thank you
GC

Statistics: Posted by GenCode — 20 May 2022, 11:59


]]>