diff --git a/java/src/com/android/inputmethod/latin/InputAttributes.java b/java/src/com/android/inputmethod/latin/InputAttributes.java index 9c32f947c304e52d17eccf562f3835343d950c0d..229ae2f3c5de33c9ee0afbf8bf93af447c71b2b5 100644 --- a/java/src/com/android/inputmethod/latin/InputAttributes.java +++ b/java/src/com/android/inputmethod/latin/InputAttributes.java @@ -29,6 +29,7 @@ public class InputAttributes { final public boolean mInputTypeNoAutoCorrect; final public boolean mIsSettingsSuggestionStripOn; final public boolean mApplicationSpecifiedCompletionOn; + final public int mEditorAction; public InputAttributes(final EditorInfo editorInfo, final boolean isFullscreenMode) { final int inputType = null != editorInfo ? editorInfo.inputType : 0; @@ -91,6 +92,8 @@ public class InputAttributes { mApplicationSpecifiedCompletionOn = flagAutoComplete && isFullscreenMode; } + mEditorAction = (editorInfo == null) ? EditorInfo.IME_ACTION_UNSPECIFIED + : editorInfo.imeOptions & EditorInfo.IME_MASK_ACTION; } @SuppressWarnings("unused") diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 7232a4883a434d0f3569abfa7fff7d7ecf9ad525..796d4ac798194e915c265f9e7cf886059f187869 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1257,6 +1257,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen handleLanguageSwitchKey(); break; default: + if (primaryCode == Keyboard.CODE_TAB + && mInputAttributes.mEditorAction == EditorInfo.IME_ACTION_NEXT) { + performEditorAction(EditorInfo.IME_ACTION_NEXT); + break; + } mSpaceState = SPACE_STATE_NONE; if (mSettingsValues.isWordSeparator(primaryCode)) { didAutoCorrect = handleSeparator(primaryCode, x, y, spaceState);