Fixed softkeyboard's (simulated) backspace not being recognized (#714)

The fix assumes that if a key-event's device is not recognized and the soft-keyboard is open, it is a touch-input event.
empirephoenix-patch-1
NemesisMate 7 years ago committed by Kirill Vainer
parent fb99ca90b1
commit 4251d70b75
  1. 4
      jme3-android/src/main/java/com/jme3/input/android/AndroidInputHandler14.java

@ -139,8 +139,10 @@ public class AndroidInputHandler14 extends AndroidInputHandler implements View.O
boolean isJoystick =
((source & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD) ||
((source & InputDevice.SOURCE_JOYSTICK) == InputDevice.SOURCE_JOYSTICK);
boolean isUnknown =
(source & android.view.InputDevice.SOURCE_UNKNOWN) == android.view.InputDevice.SOURCE_UNKNOWN;
if (isTouch && touchInput != null) {
if (touchInput != null && (isTouch || (isUnknown && this.touchInput.isSimulateKeyboard()))) {
// logger.log(Level.INFO, "onKey source: {0}, isTouch: {1}",
// new Object[]{source, isTouch});
consumed = touchInput.onKey(event);

Loading…
Cancel
Save