- Prevent the BACK/ESCAPE key to end the application only from a hardware keyboard (Github Fix: #10).

This commit is contained in:
dgis 2019-07-13 16:40:52 +02:00
parent 7a9f7abb56
commit d8fb3a9ec0
2 changed files with 6 additions and 5 deletions

View file

@ -57,7 +57,8 @@ CHANGES
Version 1.6 (2019-07-XX)
- Add option to prevent the pinch zoom.
- Prevent the white bottom bar when both options "Hide the status/navigations bar" and "Hide the menu button" are set (Github Fix: #6).
- Prevent the white bottom bar when both options "Hide the status/navigations bar" and "Hide the menu button" are set (Github Fix: #9).
- Prevent the BACK/ESCAPE key to end the application only from a hardware keyboard (Github Fix: #10).
Version 1.5 (2019-07-11)

View file

@ -209,9 +209,9 @@ public class MainScreenView extends PanAndScaleView {
if (windowsKeycode != 0)
NativeLib.keyDown(windowsKeycode);
else if(debug) Log.e(TAG, String.format("Unknown keyCode: %d", keyCode));
if(keyCode == KeyEvent.KEYCODE_BACK)
return true;
}
if(keyCode == KeyEvent.KEYCODE_BACK)
return true;
return super.onKeyDown(keyCode, event);
}
@ -226,9 +226,9 @@ public class MainScreenView extends PanAndScaleView {
if (windowsKeycode != 0)
NativeLib.keyUp(windowsKeycode);
else if(debug) Log.e(TAG, String.format("Unknown keyCode: %d", keyCode));
if(keyCode == KeyEvent.KEYCODE_BACK)
return true;
}
if(keyCode == KeyEvent.KEYCODE_BACK)
return true;
return super.onKeyUp(keyCode, event);
}