Getting the action bound to a key

Maybe I’m going about this the wrong way, but here is what I want to do, and how I am currently trying to do it:

I have my game simulation running at a fixed rate and I want to pass input into the simulation, input can of course happen at any point inbetween simulation ticks, so I am looking to check for all input since the last tick so they can be processed “this” tick. (does that make sense?)

currently, in the tick function of my player controller (which is ticking every frame) I am trying to

get all keys pressed (with EKeys::GetAllKeys())
for each key pressed
get action bound to key (with FGetActionsBoundToKey::Get())
add the action to an array for actions triggered

then when the game simulation ticks, I iterate through the array, perform what ever function I want to happen for each event, then empty the array so it can refill with inputs for the next cycle.

The problem I have is that FGetActionsBoundToKey is a private member of UPlayerInput and I cannot access it through my player controller. Looking through the source, my current knowledge of c++ says that if I really want to access it, I’ll have to change the engine code.

So, maybe this isn’t the best approach, as I don’t think it will handle key combinations very well as GetAllKeys() just provides a list of keys with no context.

So to answer my own question, I’m thinking a better approach is to instead have an array of structs, each struct containing information about the action performed, and then binding every action to a function which fills out a new struct and adds it to the array (is there an easy way to bind all actions to a single function? and can a delegate function know about what action called it?). This would require more setup i think, and another layer on top of the existing input system (I was hoping to do something with the tools provided by unreal rather than make something new).

I suppose I am essentially trying to make a simple input buffer and I’m wondering if it can be done with what unreal provides, or if there is more setup needed

Please let me know if none of that makes any sense and you want a better explanation!

Thankyou in advance.