there is a error in the reference see https://processing.org/reference/mousePressed.html it has the text of the function mousePressed(), but it should be the text for the variable mousePressed The code example is correct, function mousePressed() is also correct **=== Context ===** [mousePressed](https://processing.org/reference/mousePressed.html) Variable storing if a mouse button is pressed [mousePressed()](https://processing.org/reference/mousePressed_.html) Called once after every time a mouse button is pressed