Support player 1 using keyboard OR gamepad?

I’m working on a local multiplayer game and I’m trying to add optional keyboard/mouse support for player 1. That is to say, if users only have 1 gamepad, they can play with 1 gamepad for player 2 and keyboard/mouse for player 1. I’ve found the engine setting “skip assigning gamepad to player 1” but that won’t work because if that’s turned on, then gamepad only groups don’t work. In other words, with that setting turned on, if a group of 4 connects 4 gamepads, the game would try to assign those to slots 2-5 instead of 1-4. If there was a way to change that engine setting at runtime somehow, then I could make that work, but I haven’t found anything like that.

Any help would be appreciated.

https://forums.unrealengine.com/unreal-engine/feedback-for-epic/48403-keyboard-p1-gamepad-p2-please/page2?77112-Keyboard-p1-gamepad-p2-please!=