CommonInput detection constantly switching between both MouseAndKeyboard and Gamepad?

In my project, I have a virtual cursor (based on Rama’s free plugin), and I am listening for events from CommonUI/CommonInput’s OnInputMethodChangedNative delegate within my PlayerController BP. Currently, this PlayerController BP looks like the following:



CreateDeviceListener is just a wrapper for my CPP plugin which hooks into CommonInput:


EnableCursor and DisableCursor are just wrappers for setting the Input Mode and enabling/disabling Rama’s Virtual Cursor:


Everything seems to work as expected, and I am getting proper device change updates printed to both the screen and output log when the cursor is disabled (Game Only input mode)… But as soon as I enable the virtual cursor (Game And UI input mode), moving the left analog stick on the gamepad seems to register as a MouseAndKeyboard AND THEN ALSO Gamepad… They are constantly fighting for control:

Using just the mouse and/or keyboard seems to work just fine, but all gamepad inputs (including both analog inputs and all buttons) seem to display this odd behavior.

Why is this, and how can it be prevented?

I’ve also tried creating a subclass of IInputProcessor, and registering it like so:

auto InputDetector = MakeShareable(new FInputModeDetector());
FSlateApplication::Get().RegisterInputPreProcessor(InputDetector);

…and then overriding HandleKeyDownEvent, HandleAnalogInputEvent, HandleMouseMoveEvent, HandleMouseButtonDownEvent and HandleMouseWheelOrGestureEvent, but it also often struggles to differentiate between mouse movement and gamepad movement, as well as differentiate between GamepadFaceButtonBottom and LeftMouseButton… I’d really appreciate any light that could be shed on this topic!