Ok here is how I would do it. Remember there are may ways to implement it.
Basically, you have a variable that you keep appending text to to keep track of what keys are pressed. You'll use expressions to check if the last x characters in this variable match your cheat code then do something.
I'll add in an event to delete the leftmost character after the variable is x length, so it doesn't keep growing forever.
https://www.dropbox.com/s/ki12vj9ylgsc3 ... .capx?dl=0