Press the space key to switch between pencil and eraser. Press the e key to stop the code so that you can take a screenshot, then you can press it again to continue. Hover over a button/colour and press the s key to select that colour/button
All made by me. Drawing function by scratch.