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

Commit db8eba50 authored by Danesh M's avatar Danesh M Committed by Danesh Mondegarian
Browse files

Keyboard : Swipe Gestures

Currently only swipe down is implemented to hide the keyboard.
This patchset makes use of the other 3 directions.

Up : Caps (on/off) or ALT (on/off) depending on which mode you're in
Left/Right : Alternate back/forth keyboard modes

Change-Id: Id36319eab0d085b4faa99ff7738e0ade2984596a
parent 5f668627
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -2339,10 +2339,13 @@ public class LatinIME extends InputMethodService
            if (!TextUtils.isEmpty(text)) {
            if (!TextUtils.isEmpty(text)) {
                mKeyboardSwitcher.getInputView().startPlaying(text.toString());
                mKeyboardSwitcher.getInputView().startPlaying(text.toString());
            }
            }
        } else {
            changeKeyboardMode();
        }
        }
    }
    }


    public void swipeLeft() {
    public void swipeLeft() {
        changeKeyboardMode();
    }
    }


    public void swipeDown() {
    public void swipeDown() {
@@ -2351,6 +2354,13 @@ public class LatinIME extends InputMethodService


    public void swipeUp() {
    public void swipeUp() {
        //launchSettings();
        //launchSettings();
        if (mCapsLock) {
            mCapsLock = false;
            mKeyboardSwitcher.setShifted(false);
        } else {
            mCapsLock = true;
            mKeyboardSwitcher.setShiftLocked(true);
        }
    }
    }


    public void onPress(int primaryCode) {
    public void onPress(int primaryCode) {