I created a simple Widget to show the problems that I’m facing. The issue is that once I use “Set Input Mode UI Only,” I’m no longer able to capture keyboard input. I want to prevent the character from moving when the widget is open. Any idea what I might be missing? Thanks!
What exactly does not work? In UI Only mode, input is not processed by the Player Controller. You’ve implemented the ANY key in the widget - you’re testing out the wrong thing if the goal is to:
prevent the character from moving when the widget is open.
Characters are usually asked to move by the PC or the Pawn which Input UI Only mode would prevent. This is enough:
The controller is no longer processing input. Whether you add a widget or not does not even matter.
is not capturing the keys.
Input in widgets is handled (and, optionally, consumed) by overriding onKeyDown / onKeyUp. What does it even have to do with character movement? I sense a great deal of confusion here.
If your referring to the UI as not capturing keys, you may need to set the focus to that widget on construction, and add some overrides for on key pressed to give desired controls to the UI, also ensure the UI and any children are hit testable, or they won’t respond to mouse clicks