I am trying to create a reset button in processing that would let the user press a key and the canvas would reset and become blank. I used the keyPressed function but it doesn't work.
void setup(){
size(900,900);
background(25, 57,0);
}
void draw(){
if(mousePressed){
ellipse(mouseX,mouseY,30,40);
fill(255,255,255);
stroke(200,100,100);
}
if(keyPressed==true){
}
saveFrame();
}