Don't close Processing when ESC key is pressed.

edited March 2016 in Programming Questions

Hi,

I found some lines to prevent Processing to close when I press the escape key:

if(keyCode == ESC) key = 0;

It worked some days ago but now... it's not working anymore... I tried with a old version of my code, and it worked. I can't copy all my code here, because it would take too much place.

Thanks in advance.

Tagged:

Answers

  • edited April 2016 Answer ✓

    Oh, ok, problem solved. My condition was inside of keyPressed() and it need to be inside of keyPressed().

    PS: How can I set the topic as "solved" by the way ?

  • just click answer on my post

    ;-)

Sign In or Register to comment.