Unreal Engine Widgets use several input events to provide input capture, specifically OnKeyup/Down and OnMouseButtonDown. My game is designed to never show a mouse cursor, so navigation of the UI is strictly up/down/left/right navigation with select/back options. This works great with a keyboard and even with the built-in Unreal Engine GamePad support.
If I enable Steam Input for my game, this disables all other gamepad input, so the built-in Unreal Engine gamepad support no longer works and navigation is broken; only working with the keyboard. Has anybody else experienced this and found a workaround?
A bit more information as I keep digging into this issue:
The problem isn’t configuration, but rather than Steam Input data has no way to get INTO the Widget input queue AFAIK. As the developer, it would be my responsibility to get the Steam Input Action Handle data into the widget input stream, and I can’t figure it out. I’ve tried various methods of Blueprint communication, but none of these seem relevant (https://docs.unrealengine.com/5.1/en-US/how-to-use-blueprint-communications-in-unreal-engine/). There also doesn’t appear to be any way of building an input or key event, at least from Blueprints, though perhaps a C++ solution might present itself.
For non-widget input, I can poll the Action Handle data to get pending inputs and handle them. This is done from the pawn actor, same as the ‘legacy’ Input and Enhanced Input mechanisms in UE5. Widgets have a completely separate mechanism. The Widget-specific events “OnMouseButtonDown”, “OnMouseMoved” and “OnKeyUp/Down” are the only direct ways for widgets to receive input. There doesn’t appear to be any way to take the Steam Input Action Handle data and send it to this input stream. This is important, because the OnKeyUp/Down, etc. events get ‘bubbled’ (Epic’s term) to all active widgets until one of them says it was handled.
When in “UI Only” input mode, Input Events from standard/enhanced input are ignored. Steam Input events continue to work, but again, there’s no way to ‘inject’ them into the widget’s input stream.
After a week of research, I’ve come to the conclusion that this isn’t possible without some C++ code. I wrote a little BluePrint Function Library class and then leveraged some code from the Hololens Input implementation to figure it out. In summary, I get the Slate app message handler (FSlateApplication::Get().GetPlatformApplication()->GetMessageHandler()), map the incoming key index (uint32 CharCode = LegacyMapVirtualKey(KeyIndex)) and then use the message handler to call either key up or down (e.g. MessageHandler->OnKeyDown(KeyIndex, CharCode, false)).