Key repeat function

This is a function keyPressed()

Use the boolean variable keyPressed in draw() instead

if (keypressed) …