We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello,
im new to programming and picked up processing yesterday. i can draw simple stuff etc.
now i wanted to make the following, a simple black fullscreen and when pressing the esc key the program stops/exits.
the blackscreen is working but i cant seem to get the exit stuff to work can someone please tell me what im doing wrong here?
void setup() {
fullScreen();
stroke(0);
fill(0);
rect(0, 0, 2560, 1440);
}
void keyPressed() {
if (key==ESC) {
key=0;
exit();
}
}
Answers
This works for me.
thank you very much!