Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ec31f49 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

A gesture should not start from the delete key

Change-Id: I5c8c7665454b7f10f944f307431dfffe20cf3134
parent e3c0301b
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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 {
+2 −1
Original line number Diff line number Diff line
@@ -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);
        }