How to override 'Gamepad Face Button Bottom' binding of the UI (so it doesn't behave like left click)?

When navigating UI with gamepad, pressing GamepadFaceButtonBottom behaves like clicking LMB. Is there a way to override this behavior? I want to be able to control UI with gamepad, while still having button A on XBox to do something else unrelated to the UI.

I know CommonUI adds a CommonAnalogCursor, enabled by default, which listens for the “Virtual_Accept” key. It is initialized in InputCoreTypes.cpp by calling FPlatformInput::GetGamepadAcceptKey();, which returns EKeys::Gamepad_FaceButton_Bottom;.

1 Like

Im facing this same issue, when i press A button in game the first time it acts as mouse click and holds it forever

It is fixed by ShouldVirtualAcceptSimulateMouseButton() starting from version UE 5.4

The following solution is only applicable for older versions of UE 5.4

Until Epic provides a separate method to disable Virtual Accept, I have temporarily addressed it by adding the following hack code to the initialization function without modifying the engine code:

#include "InputCoreTypes.h"

UMyGameInstance::UMyGameInstance()
{
    // This is a hack to disable Virtual Accept
    // Associated with FCommonAnalogCursor::HandleKeyDownEvent and FAnalogCursor::HandleKeyDownEvent
    FKey& virtual_key = const_cast<FKey&>(EKeys::Virtual_Accept);
    virtual_key = EKeys::Invalid;
}

This one work for me! as I only apply this as temporary fix, but how do you revert the virtual_accept back to it initial value ( enable it ) during runtime ?