say that I'm making a action game.
And I'm try to get the player run. I want you to double tap the key(like →→)for the running(of course, the 2nd → have to be hold).

Or maybe I'm making a fighting game. That I have to read player input for a special attack(like ↓→+punch = hadoken, →↓→+ punch = shoyoken). Or in the training stage, the player can see what he had inputed(like showing the input "→↓←→←↓→↑↓→←...").

I think I need a function that reads the player's input in orders(and store them or show them). Then if the input order fits some kind of sequence, the player make a special move.