A gesture should not start from the delete key
Change-Id: I5c8c7665454b7f10f944f307431dfffe20cf3134
This commit is contained in:
parent
e3c0301b31
commit
3ec31f4971
2 changed files with 3 additions and 3 deletions
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue