Processing Forum
void keyPressed() {
// doing other things here, and then:
if (key == CODED && keyCode == KeyEvent.KEYCODE_HOME)
{ // override the home key here }
}
I added the following to my code:
- public void onHomePressed() {
- // Do nothing...
- }
Thanks,
Gary
EDIT 1: I'm not certain I can use this to my advantage, but I found that the Home button calls onUserLeaveHint() however the Back button does not. onResume and onPostResume run when I restart whether I exited via Back or Home
EDIT 2: I recently noticed that print() statements in the setup() routine are not working when I restart the app after exiting via the Home button but they do execute when I exit via the Back button. print() statements in the draw() routine work either way.