CommonUI Forces Mouse/Keyb Input When Opening Menu Via Gamepad

Hello,

I have CommonUI set up with Mouse and Keyboard and Gamepad, everything’s working properly except when swapping between Mouse and Gamepad, if I move the mouse and then open the menu widget on gamepad, the Input type snaps to Keyboard and Mouse, which means a cursor appears and there is no focus on any of the widgets.

If I close the menu using gamepad, and re-open it, it will suddenly have gamepad focus every time thereafter. However as soon as I move the mouse again outside of the menus (I.E. move the camera around via mouse), then the next time I open the menu with the gamepad (even if I’ve been moving around with the gamepad), then surprise: mouse cursor and no gamepad focus. As always, if I press one gamepad button at that point, it resumes focus.

I’ve identified what seems to be happening: After assigning "On Input Changed, print current Input, every time I tap the gamepad it changes to gamepad, every time I move the mouse or press a key it changes to Mouse and Keyboard, which is working as intended. However: If I’m on gamepad, move the mouse, and then swap back to gamepad, it will clearly tell me my current input is Gamepad. But as soon as I open the menu, it forces itself to Mouse and Keyboard and there’s nothing I can do!

If I re-open the menu, it stays on gamepad. This is literally only happening if I move the mouse, and the behavior is eliminated and never replicated as long as I don’t touch the mouse anymore.

Does anyone know why this is happening? I’ve toggled so many settings on and off in the Widget and in the Project Settings, and tried forcing input to gamepad from the CommonUI node, but it literally ignores any attempt I have and forces itself back into Mouse n Key for that one specific instance.

EDIT: Forgot to add, this does not happen if I press a key on the keyboard, it only happens with mouse movement and nothing else!

I have the exact same issue.

The first time I open my pause menu (or activate any widget where mouse cursor is supposed to be visible when playing with KB+mouse) with gamepad, the input method will switch to Mouse and Keyboard. After that, opening the pause menu again works as expected (Input method stays as Gamepad).

But if I move the mouse while playing, and then go back to playing with gamepad, the issue returns the next time I open the pause menu. Pressing keyboard buttons and then returning to gamepad to open pause menu does not trigger the issue again, only mouse movement does.

I’ve set up minimal test projects in 5.5, 5.6, 5.7 and 5.8 to reproduce the issue, with a simple HUD widget (Input Config with Mouse Capture Mode = Capture Permanently) and a simple menu widget (Input Config with Mouse Capture Mode = No Capture) that are pushed to a Common Activatable Widget Stack.

The issue occurs in 5.6, 5.7 and 5.8, but not in 5.5.

For now, my workaround is to manually force the input type back to Gamepad using the Set Current Input Type if it switches to Mouse and Keyboard shortly after opening the pause menu.
I don’t like it but I haven’t found any better solution :frowning: