Disable Mouse input (clicking, moving, hover events) for UMG

My goal is to just have keyboard and gamepad input for my menus and i’m trying to figure out how to disable mouse input.

Right now i have SetInputUIOnly, i have mouse cursor disabled in the player controller with click event and overlap turn off as well, i tried overriding all the mouse functions in the widget blueprint and have them just return handled. i tried playing around with Project Settings → Input → Viewport Capture and so far no luck on disabling the mouse.

Any ideas?

Hey falola-

You should be able to remove the mouse bindings from Project Settings → Engine → Input. In the Axis/Action Mappings sections you can control which keyboard/mouse/gamepad buttons correspond to which events. Removing any mouse settings here should prevent the mouse from providing input.

Cheers

1 Like

So this is all i have in the axis mapping and i still see / can use the mouse as input for UMG.

Based on your input settings setup, the mouse shouldn’t have any affect on controls / input in the game. If you are still having issues with your mouse and UMG, please try setting the widget’s Visibility to Hit Test Invisible. This should prevent interaction with the widget. You will need to set this for each widget you want to note interact with the mouse.

Won’t setting the widgets to Hit Test Invisible also stop the gamepad from interacting with UMG using the navigation options?

No, the gamepad can still interact with the widget. This is simply a visibility setting that, when set to Hit Test Invisible, will take no input from the mouse nor block the mouse.