A gesture should not start from the delete key
Change-Id: I5c8c7665454b7f10f944f307431dfffe20cf3134main
parent
e3c0301b31
commit
3ec31f4971
|
@ -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 New Issue