Replace WasInputKeyJustPressed with gamepad input event

Hello, I would like to use an input binding of the gamepad into a C++ actor class (designed for lift purpose).

At the moment, I have the following test in my C++ LiftActor class:
if (PlayerController->WasInputKeyJustPressed(EKeys::F))

I’ve defined several bindings in Project Settings/Input, and I now have the “Action” input mapped to F key and “Gamepad Face button bottom”.
If I use a blueprint, I can easily get my “Input Action” event, but to get this event in my C++ code. How can I do that ?

Thanks for any help.

I found the answer by myself:

bool bKeyPressed = PlayerController->WasInputKeyJustPressed(EKeys::F);
bool bGamepadKeyPressed = PlayerController->WasInputKeyJustPressed(EKeys::Gamepad_FaceButton_Bottom);
if (bKeyPressed || bGamepadKeyPressed)
{

Now don’t work, unreal engine 4 is crashing…