Hey community,
I’m currently writing code to automatically take ansel screenshots chained. Don’t know if you know it but you can’t access a lot of ansel so I need to simulate keyboard keys to configure the screenshot taken. So I have the code:
INPUT input = {0};
WORD vkCode;
input.type = INPUT_KEYBOARD;
switch(inputType) //my enum to detect which key needs to be pressed
{
case EInputType::Space:
vkCode = VK_SPACE;
break;
case EInputType::MoveRight:
vkCode = VK_LEFT;
break;
//I catch more but this is enough for demonstration
}
input.ki.wVk = vkCode;
SendInput(1, &input, sizeof(INPUT));
input.ki.dwFlags = KEYEVENTF_KEYUP;
SendInput(1, &input, sizeof(INPUT));
So for spacebar this works really fine but for arrow keys this just doesn’t do anything for ansel. If I switch to UE Editor the inputs get send and received but in standalone ansel UI this just doesn’t do anything.
Does anyone have some idea for a workaround?