How to send an input key event from code?

Found a solution myself.

I grabbed the viewport client through

GEngine->GameViewport->Viewport->GetClient()

And then sent the input through the client’s input method

Client->InputKey(Viewport, 0, Key, EInputEvent::IE_Pressed);
1 Like