I found the answer by myself:
bool bKeyPressed = PlayerController->WasInputKeyJustPressed(EKeys::F);
bool bGamepadKeyPressed = PlayerController->WasInputKeyJustPressed(EKeys::Gamepad_FaceButton_Bottom);
if (bKeyPressed || bGamepadKeyPressed)
{
I found the answer by myself:
bool bKeyPressed = PlayerController->WasInputKeyJustPressed(EKeys::F);
bool bGamepadKeyPressed = PlayerController->WasInputKeyJustPressed(EKeys::Gamepad_FaceButton_Bottom);
if (bKeyPressed || bGamepadKeyPressed)
{