up arrow to move forward (for the bug), down for the opposite, left arrow to turn left (bug's left), and right arrow to turn to the bug's right, W to make the pen wider, N to make it narrower. U to lift the pen, D to put it down again. click the screen to lift the pen and then move the bug to your mouse pointer's location.
I made this with the help of the scratch book!