Without CommonUI, I can directly use an EnhancedInputAction in the widget blueprint with its Started, Completed etc. events firing off when expected.
However, with CommonUI input routing this is no longer possible. I’ve created a custom c++ class derived from UCommonActivatableWidget and added some functions to register input bindings
void UExtendedCommonActivatableWidget::RegisterBinding(UInputAction* InputAction, const FInputActionExecutedDelegate& Callback, FUIActionBindingHandle& BindingHandle)
{
FBindUIActionArgs BindArgs(InputAction, FSimpleDelegate::CreateLambda(InputAction, Callback
{
Callback.ExecuteIfBound(InputAction);
}));
BindArgs.bDisplayInActionBar = false;
BindingHandle = RegisterUIActionBinding(BindArgs);
BindingHandles.Add(BindingHandle);
}
and I’ve created a non-generic data asset derived from CommonMappingContextMetadata, and set up the input actions to be non-generic. Now when I register a non-generic input action in a widget blueprint, and I can add the input action node
but the issue is, when I press the respective key, Started and Triggered are fired off immediately as expected, but Completed fires off automatically on the next frame, and not when I release the key.
Is there a way to fix this? Am I doing something wrong with binding registration?
Thank you in advance!
