BindAction delegates: what parameters do they take?

I am trying to work with keyboard input in C++ but I can’t find anywhere in the documentation what the signature is for delegate functions.

I have an action mapping in the project called “Typing” for any key.

I have a class that inherits from PlayerController that overrides SetupInputComponent and calls this:

InputComponent->BindAction("Typing", IE_Pressed, this, &AKeyboardController::HandleTyping);

What I can’t find anywhere is what the engine will pass to HandleTyping. I’m guessing it’s some kind of key event struct, but I don’t want to guess, I want to look it up. I’ve seen tutorials that show axis bindings getting a float value, which makes sense, but I don’t see anywhere in the docs that tell you this is what will happen.

Any suggestions on where to look?

I’m not sure if I get your question. If you ask for proper declaration of functions that you bind to input actions then the declaration is just:

void HandleTyping();

As you can see, you cannot pass anything into these functions. As for input axis, these function do have a single float variable as a parameter. So function declaration for axis binding would look like:

void SomeAxisBindingFunction(float InValue);

Hopefully this answers your question.


Hmm… I was hoping the engine would call the handler with an event that described what key/keys were pressed. I guess I need to get that some other way.