diff options
author | 2012-07-18 14:05:01 +0900 | |
---|---|---|
committer | 2012-07-18 14:38:51 +0900 | |
commit | 3ec31f4971c3db7ef73488859609870d15f5dc69 (patch) | |
tree | 672b8cf90f82ef26e7360bfd8b54c9cdf16fb791 /java/src | |
parent | e3c0301b31fd62bcb07db7bdb57dc542b4b4a358 (diff) | |
download | latinime-3ec31f4971c3db7ef73488859609870d15f5dc69.tar.gz latinime-3ec31f4971c3db7ef73488859609870d15f5dc69.tar.xz latinime-3ec31f4971c3db7ef73488859609870d15f5dc69.zip |
A gesture should not start from the delete key
Change-Id: I5c8c7665454b7f10f944f307431dfffe20cf3134
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/Keyboard.java | 3 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/internal/GestureTracker.java | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/Keyboard.java b/java/src/com/android/inputmethod/keyboard/Keyboard.java index 1aec00129..f1a35b212 100644 --- a/java/src/com/android/inputmethod/keyboard/Keyboard.java +++ b/java/src/com/android/inputmethod/keyboard/Keyboard.java @@ -87,7 +87,6 @@ public class Keyboard { public static final int CODE_CLOSING_SQUARE_BRACKET = ']'; public static final int CODE_CLOSING_CURLY_BRACKET = '}'; public static final int CODE_CLOSING_ANGLE_BRACKET = '>'; - private static final int MINIMUM_LETTER_CODE = CODE_TAB; /** Special keys code. Must be negative. * These should be aligned with KeyboardCodesSet.ID_TO_NAME[], @@ -217,7 +216,7 @@ public class Keyboard { } public static boolean isLetterCode(int code) { - return code >= MINIMUM_LETTER_CODE; + return code >= CODE_SPACE; } public static class Params { diff --git a/java/src/com/android/inputmethod/keyboard/internal/GestureTracker.java b/java/src/com/android/inputmethod/keyboard/internal/GestureTracker.java index f98911445..dfd697a7a 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/GestureTracker.java +++ b/java/src/com/android/inputmethod/keyboard/internal/GestureTracker.java @@ -104,7 +104,8 @@ public class GestureTracker { public void onDownEvent(PointerTracker tracker, int x, int y, long eventTime, Key key) { mIsPossibleGesture = false; - if (GESTURE_ON && mIsAlphabetKeyboard && key != null && !key.isModifier()) { + // A gesture should start only from the letter key. + if (GESTURE_ON && mIsAlphabetKeyboard && key != null && Keyboard.isLetterCode(key.mCode)) { mIsPossibleGesture = true; addPointToStroke(x, y, 0, tracker.mPointerId, false); } |