Interesting question. I would store input actions in a list and only accept actions coming with only a short interval between them. I’d then match the current sequence of actions against a list of supported sequences and if there’s a match the attack would be performed. I created an example to show what I mean:
CODE: https://github.com/britzl/publicexamples/tree/master/examples/fighter_combo
HTML5: http://britzl.github.io/publicexamples/fighter_combo/index.html
Available combos:
Z = Punch
DOWN, Z = Low Punch
UP, X = High Kick
DOWN, RIGHT, Z = Hadouken