Checking Input

So, here is my question.
I have Action Event named “PrimeFire”, and it has keys “LMB” and “J”

121483-снимок.png

Sometimes I need to check is keys of my action event “PrimeFire” down or not. Of course I allways can just check is “LMB” or “J” are down, but what if player would change bindings in the options?

So, how do I check what keys bind by my Action Event and are any of those keys down now?
I need to do this in blueprint and in code.

Any Ideas?

bool IsKeyDown = false;
TArray KeysArray = UGameplayStatics::GetPlayerController(GetWorld(), 0)->PlayerInput->GetKeysForAction(“PrimeFire”);
for (int i = 0; i < KeysArray.Num(); i++)
{
FKey Key = KeysArray[i].Key;
if (UGameplayStatics::GetPlayerController(GetWorld(), 0)->IsInputKeyDown(Key))
{
IsKeyDown = true;
}
}