Press right and left arrow keys to rotate the cube. Press space bar to automatically rotate the cube and then press it again to stop rotating it. You can change the color and size of the cube by clicking the up and down arrows on the screen. If you want to change color faster, you can use up and down arrow keys on your keyboard. If you want to do the same with size, press w and s keys.
This is very simple that it doesn't use pen extension. I'm not that good at coding, so I couldn't code up and down rotation. :(