Rotate Cube Partially

Hey everyone. I know how to make it so my cube rotates when i press up arrow. But how would i get it so when i click it, the cube rotates on to its next side. Pretty much the same cube movement seen in ColorCube
(i do not in anyway plan to copy it, dont worry)
I just am wondering how to do similar looking movements.

look my setup and i hope you understand.
I didnt know how to make it but with 10 min there is the result, use the arrow up to go front and arrow back to go back.
You ll need to delete the Zloc ipo or the cube will start to fly.
I hope it helps

OK that will work. But if anyone knows of another way, please let me know.
Thanks leonnn

Witch way do you want??? that s the easiest way?
If you dont understand this you really should make a lot of tutorials to learn more about BGE.

I really dont understand

Dont worry i am not so noobish. I understand this way completely. i 100% get it, i was just asking if there are alternate ways of doing, out of interest.
Thanks for the answer though, it helped me out a lot.