How to make the mouse exclusive?

I’ve looked through the documentation and haven’t been able to find much on the subject. Essentially I’ve created a controller for my game to handle the mouse on screen. What I’m trying to do is lock the mouse to the game window so, for example, if some one is playing in windowed mode they do no move the cursor out of the window and click which will the unfocus the game.

AIncandescentController::AIncandescentController(const class FPostConstructInitializeProperties& PCIP)
	: Super(PCIP)
	bShowMouseCursor = true;
	DefaultMouseCursor = EMouseCursor::Crosshairs;

Edit #1: The mouse seems to lock itself to the window if you put it to fullscreen (alt+enter) and back again. So maybe So maybe I should refine my question a bit: Is there a way to simulate the mouse being in fullscreen on the game window which would allow it to no go outside the bounds of the window?

All things related to window and input you can find in FViewport

And there you can find things like that :slight_smile: :

To get instace of your viewport from: