The pencil will follow and draw wherever your mouse pointer is. To clear everything, press space or the green flag. To increase the size of the pencil writing, press the up arrow, and to return it to the original size, press the down arrow. Press the right arrow to stop the pencil from drawing, and press the left arrow to resume.
Much thanks to why3-20.