/Engine/Source/Runtime/InteractiveToolsFramework/Public/BaseBehaviors/AnyButtonInputBehavior.h
The target device button is selected using the .ButtonNumber property, or you can override the relevant GetXButtonState() function if you need more control.
class UAnyButtonInputBehavior : public [UInputBehavior](API\Runtime\InteractiveToolsFramework\UInputBehavior)
EInputDevices
ActiveDevice
Which device is currently active
TUniqueFunction...
GetMouseButtonStateFunc
ReturnsFDeviceButtonStatefor target mouse button