How to add a series of input binding to call a particular function?

I want to add multiple input bindings to call a particular function i.e. in a similar way to the cheat codes used in the GTA series. Eg. If you hold shift button and press J+E+T then a function would be called and you will possess a jet. Is there any way we can do this, such input binding?! Kindly help.

You could do this by:

  1. Having a list of keywords defined e.g. “JET”, “PLANE” etc

  2. Create an input binding and corresponding functions on SHIFT press & release

  3. Bool variable that keeps track of whether cheat keys input should be listened for (set to true on SHIFT press, false on SHIFT release). You’ll have to dig around to figure out how to get specific keys pressed instead of creating input handlers for each key on the keyboard. Look at some C++ key rebinding tutorials, should give you the answer.

  4. FString variable used to build string from keys pressed while listening for cheat keys, e.g. while SHIFT is down and “C” is pressed add C to string.

  5. On SHIFT release compare value of string variable to list of keywords and call appropriate function to possess jet. Clear string variable value.

Alternatively you could just add a console function that accepts text input and calls the appropriate function.