Walking using 2 buttons alternately

how do I make the character walking using 2 button, like ‘A’ and ‘S’ alternately, instead using just single button to move forward? You know, kinda like when we walk, right and left?
Is that possible?
Thanks in advance.

First, I believe this is a design question and should go into the forums.

Second, if you ask whether it’s possible or not it sounds like you haven’t even tried anything. Someone should play the What have you tried? card.

Third, yes. It is possible and can be easily achieved by using a simple state machine with an enum or even a couple booleans.