public void setExitOnEscPressed(boolean exitOnEscPressed) {
        this.exitOnEscPressed = exitOnEscPressed;
    }
Determines whether the system would exit on pressing the keyboard esc button.

@param exitOnEscPressed true to activate exiting on Esc button press, false otherwise.
jme3-android/src/main/java/com/jme3/view/surfaceview/JmeSurfaceView.java