diff options
author | 2010-09-07 01:31:04 -0700 | |
---|---|---|
committer | 2010-09-07 01:31:04 -0700 | |
commit | 26aff8c62f61f18b1b9a40ce647984284a41c895 (patch) | |
tree | aa945aff353d7910bba92305ac9dbdb296dc8c87 /java/src/com/android/inputmethod/latin/PointerTracker.java | |
parent | 0723056043adee17bc9b49b06a5ca7a81a804d16 (diff) | |
parent | 6252f468bc1306f71c9933f65b116dbbb5530de8 (diff) | |
download | latinime-26aff8c62f61f18b1b9a40ce647984284a41c895.tar.gz latinime-26aff8c62f61f18b1b9a40ce647984284a41c895.tar.xz latinime-26aff8c62f61f18b1b9a40ce647984284a41c895.zip |
Merge "Fixed extra periods when chording with shift and space" into gingerbread
Diffstat (limited to 'java/src/com/android/inputmethod/latin/PointerTracker.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/PointerTracker.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/PointerTracker.java b/java/src/com/android/inputmethod/latin/PointerTracker.java index 1f6005621..f849158ae 100644 --- a/java/src/com/android/inputmethod/latin/PointerTracker.java +++ b/java/src/com/android/inputmethod/latin/PointerTracker.java @@ -65,6 +65,9 @@ public class PointerTracker { // true if event is already translated to a key action (long press or mini-keyboard) private boolean mKeyAlreadyProcessed; + // true if this pointer is repeatable key + private boolean mIsRepeatableKey; + // for move de-bouncing private int mLastCodeX; private int mLastCodeY; @@ -176,6 +179,7 @@ public class PointerTracker { mStartY = y; mDownTime = eventTime; mKeyAlreadyProcessed = false; + mIsRepeatableKey = false; startMoveDebouncing(x, y); startTimeDebouncing(eventTime); checkMultiTap(eventTime, keyIndex); @@ -187,6 +191,7 @@ public class PointerTracker { if (mKeys[keyIndex].repeatable) { repeatKey(keyIndex); mHandler.startKeyRepeatTimer(REPEAT_START_DELAY, keyIndex, this); + mIsRepeatableKey = true; } mHandler.startLongPressTimer(LONGPRESS_TIMEOUT, keyIndex, this); } @@ -246,10 +251,9 @@ public class PointerTracker { return; if (DEBUG) debugLog("onUpEvent :", x, y); - int keyIndex = mKeyDetector.getKeyIndexAndNearbyCodes(x, y, null); - boolean wasInKeyRepeat = mHandler.isInKeyRepeat(); mHandler.cancelKeyTimers(); mHandler.cancelPopupPreview(); + int keyIndex = mKeyDetector.getKeyIndexAndNearbyCodes(x, y, null); if (isMinorMoveBounce(x, y, keyIndex, mCurrentKey)) { updateTimeDebouncing(eventTime); } else { @@ -263,8 +267,7 @@ public class PointerTracker { y = mLastCodeY; } showKeyPreviewAndUpdateKey(NOT_A_KEY); - // If we're not on a repeating key (which sends on a DOWN event) - if (!wasInKeyRepeat) { + if (!mIsRepeatableKey) { detectAndSendKey(mCurrentKey, x, y, eventTime); } if (isValidKeyIndex(keyIndex)) |