void keyReleased() {
if (key==CODED){
if(keyCode==MENU || keyCode==BACK){//MENU and BACK keys
//do things
}
}
keyCode=0;
}
in this code, when back button pressed, the program just quit.
and Menu button, you know, like this
How can I press back button in sketch without quit?