How to Use SendInput Function in WinUser.h?

void UVirtualKeyboard::SendKeyInputFromChar(char inChar)
{
INPUT i;
i.type = INPUT_KEYBOARD;

	i.ki.wScan = inChar;
	i.ki.time = 0;
	i.ki.dwExtraInfo = 0;

	i.ki.wVk = 0;
	i.ki.dwFlags = KEYEVENTF_UNICODE;
	SendInput(1, &i, sizeof(INPUT));
}

I want to create a keyboard event by myself in the same way as above.
However, WinUser.h is required to use the above code.
Adding this results in an error called “No Target Architecture”.

I need that source code for virtual keyboard control.
I don’t know how to fix the error.

Can someone tell me how to include WinUser.h in the Unreal project?

Please somebody help me.

1 Like

include <Windows.h>
in the front row

include “Windows/WindowsWindow.h”