Merge "Reset previous symbols shifted state when auto switch backed"
This commit is contained in:
commit
d054aa17da
2 changed files with 7 additions and 2 deletions
|
@ -546,16 +546,19 @@ public class KeyboardState {
|
||||||
|| code == Keyboard.CODE_OUTPUT_TEXT)) {
|
|| code == Keyboard.CODE_OUTPUT_TEXT)) {
|
||||||
mSwitchState = SWITCH_STATE_SYMBOL;
|
mSwitchState = SWITCH_STATE_SYMBOL;
|
||||||
}
|
}
|
||||||
// Switch back to alpha keyboard mode immediately if user types a quote character.
|
// Switch back to alpha keyboard mode immediately if user types one of the switch back
|
||||||
|
// characters.
|
||||||
if (isLayoutSwitchBackCharacter(code)) {
|
if (isLayoutSwitchBackCharacter(code)) {
|
||||||
toggleAlphabetAndSymbols();
|
toggleAlphabetAndSymbols();
|
||||||
|
mPrevSymbolsKeyboardWasShifted = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SWITCH_STATE_SYMBOL:
|
case SWITCH_STATE_SYMBOL:
|
||||||
// Switch back to alpha keyboard mode if user types one or more non-space/enter
|
// Switch back to alpha keyboard mode if user types one or more non-space/enter
|
||||||
// characters followed by a space/enter or a quote character.
|
// characters followed by a space/enter or one of the switch back characters.
|
||||||
if (isSpaceCharacter(code) || isLayoutSwitchBackCharacter(code)) {
|
if (isSpaceCharacter(code) || isLayoutSwitchBackCharacter(code)) {
|
||||||
toggleAlphabetAndSymbols();
|
toggleAlphabetAndSymbols();
|
||||||
|
mPrevSymbolsKeyboardWasShifted = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,6 +122,8 @@ public class KeyboardStateSingleTouchTests extends KeyboardStateTestsBase {
|
||||||
pressAndReleaseKey('~', SYMBOLS_SHIFTED, SYMBOLS_SHIFTED);
|
pressAndReleaseKey('~', SYMBOLS_SHIFTED, SYMBOLS_SHIFTED);
|
||||||
// Enter space, switch back to alphabet.
|
// Enter space, switch back to alphabet.
|
||||||
pressAndReleaseKey(CODE_SPACE, SYMBOLS_SHIFTED, ALPHABET_UNSHIFTED);
|
pressAndReleaseKey(CODE_SPACE, SYMBOLS_SHIFTED, ALPHABET_UNSHIFTED);
|
||||||
|
// Press/release "?123" key, enter into symbols (not symbols shifted).
|
||||||
|
pressAndReleaseKey(CODE_SYMBOL, SYMBOLS_UNSHIFTED, SYMBOLS_UNSHIFTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Automatic switch back to alphabet shift locked test by space key.
|
// Automatic switch back to alphabet shift locked test by space key.
|
||||||
|
|
Loading…
Reference in a new issue