Hi,
does somebody know how to block processing from closing the sketch when you press escape?
I tried this but it did not work:
void draw(){
if(key == ESC)key = 0;
}
Thank you
Hi,
does somebody know how to block processing from closing the sketch when you press escape?
I tried this but it did not work:
void draw(){
if(key == ESC)key = 0;
}
Thank you
Hi! That code should be inside void keyPressed()
, not inside void draw()
. Then it works.
Thank you so much:grinning: