From bf63daa0f7af0af98921ab2d729eed95bbaa27cd Mon Sep 17 00:00:00 2001 From: Imanol Fernandez Date: Wed, 10 Apr 2019 18:35:53 +0200 Subject: [PATCH] Cancel keyboard presses if keydown was produced on a different key (#1070) --- .../org/mozilla/vrbrowser/ui/views/CustomKeyboardView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/views/CustomKeyboardView.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/views/CustomKeyboardView.java index 1fb689a20..ceba4e8e6 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/views/CustomKeyboardView.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/views/CustomKeyboardView.java @@ -1363,7 +1363,7 @@ private boolean onModifiedTouchEvent(MotionEvent me, boolean possiblePoly) { showPreview(NOT_A_KEY); Arrays.fill(mKeyIndices, NOT_A_KEY); // If we're not on a repeating key (which sends on a DOWN event) - if (mRepeatKeyIndex == NOT_A_KEY && !mMiniKeyboardOnScreen && !mAbortKey) { + if (mRepeatKeyIndex == NOT_A_KEY && !mMiniKeyboardOnScreen && !mAbortKey && mDownKey == keyIndex) { detectAndSendKey(mCurrentKey, touchX, touchY, eventTime); } invalidateKey(keyIndex);