am 2959fc0f: Delay shift lock transient until long pressed shift key is released

* commit '2959fc0f13ec29e05eda2c4a1e9a728350a80557':
  Delay shift lock transient until long pressed shift key is released
main
Tadashi G. Takaoka 2012-05-29 03:28:41 -07:00 committed by Android Git Automerger
commit c79a710445
3 changed files with 74 additions and 76 deletions

View File

@ -85,6 +85,9 @@ public class KeyboardState {
private boolean mPrevMainKeyboardWasShiftLocked;
private boolean mPrevSymbolsKeyboardWasShifted;
// For handling long press.
private boolean mLongPressShiftLockFired;
// For handling double tap.
private boolean mIsInAlphabetUnshiftedFromShifted;
private boolean mIsInDoubleTapShiftKey;
@ -312,6 +315,7 @@ public class KeyboardState {
} else {
mSwitchActions.cancelDoubleTapTimer();
mSwitchActions.cancelLongPressTimer();
mLongPressShiftLockFired = false;
mShiftKeyState.onOtherKeyPressed();
mSymbolKeyState.onOtherKeyPressed();
// It is required to reset the auto caps state when all of the following conditions
@ -375,15 +379,7 @@ public class KeyboardState {
ResearchLogger.keyboardState_onLongPressTimeout(code, this);
}
if (mIsAlphabetMode && code == Keyboard.CODE_SHIFT) {
if (mAlphabetShiftState.isShiftLocked()) {
setShiftLocked(false);
// Shift key is long pressed while shift locked state, we will toggle back to normal
// state. And mark as if shift key is released.
mShiftKeyState.onRelease();
} else {
// Shift key is long pressed while shift unlocked state.
setShiftLocked(true);
}
mLongPressShiftLockFired = true;
mSwitchActions.hapticAndAudioFeedback(code);
}
}
@ -413,6 +409,7 @@ public class KeyboardState {
}
private void onPressShift() {
mLongPressShiftLockFired = false;
if (mIsAlphabetMode) {
mIsInDoubleTapShiftKey = mSwitchActions.isInDoubleTapTimeout();
if (!mIsInDoubleTapShiftKey) {
@ -466,6 +463,8 @@ public class KeyboardState {
// Double tap shift key has been handled in {@link #onPressShift}, so that just
// ignore this release shift key here.
mIsInDoubleTapShiftKey = false;
} else if (mLongPressShiftLockFired) {
setShiftLocked(!mAlphabetShiftState.isShiftLocked());
} else if (mShiftKeyState.isChording()) {
if (mAlphabetShiftState.isShiftLockShifted()) {
// After chording input while shift locked state.

View File

@ -57,7 +57,7 @@ public class KeyboardStateMultiTouchTests extends KeyboardStateTestsBase {
// Chording input in shift locked.
public void testChordingShiftLocked() {
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Press shift key and hold, enter into choring shift state.
@ -116,7 +116,7 @@ public class KeyboardStateMultiTouchTests extends KeyboardStateTestsBase {
// Load keyboard
loadKeyboard(ALPHABET_UNSHIFTED);
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Press/release "?123" key, enter into symbols.
pressAndReleaseKey(CODE_SYMBOL, SYMBOLS_UNSHIFTED, SYMBOLS_UNSHIFTED);
@ -134,7 +134,7 @@ public class KeyboardStateMultiTouchTests extends KeyboardStateTestsBase {
// Load keyboard
loadKeyboard(ALPHABET_UNSHIFTED);
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Press/release "?123" key, enter into symbols.
pressAndReleaseKey(CODE_SYMBOL, SYMBOLS_UNSHIFTED, SYMBOLS_UNSHIFTED);
@ -193,7 +193,7 @@ public class KeyboardStateMultiTouchTests extends KeyboardStateTestsBase {
// Load keyboard
loadKeyboard(ALPHABET_UNSHIFTED);
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Press/release "?123" key, enter into symbols.
pressAndReleaseKey(CODE_SYMBOL, SYMBOLS_UNSHIFTED, SYMBOLS_UNSHIFTED);
@ -213,7 +213,7 @@ public class KeyboardStateMultiTouchTests extends KeyboardStateTestsBase {
// Load keyboard
loadKeyboard(ALPHABET_UNSHIFTED);
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Press/release "?123" key, enter into symbols.
pressAndReleaseKey(CODE_SYMBOL, SYMBOLS_UNSHIFTED, SYMBOLS_UNSHIFTED);
@ -377,45 +377,44 @@ public class KeyboardStateMultiTouchTests extends KeyboardStateTestsBase {
}
public void testLongPressShiftAndChording() {
// TODO: The following tests fail due to bug. Temporarily commented.
// // Long press shift key, enter maybe shift locked.
// longPressKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED);
// // Press/release letter key, remain in manual shifted.
// chordingPressAndReleaseKey('A', ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED);
// // Release shift key, back to alphabet (not shift locked).
// releaseKey(CODE_SHIFT, ALPHABET_UNSHIFTED);
//
// // Long press shift key, enter alphabet shift locked.
// longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
// ALPHABET_SHIFT_LOCKED);
// // Long press shift key, enter maybe alphabet.
// longPressKey(CODE_SHIFT, ALPHABET_SHIFT_LOCK_SHIFTED, ALPHABET_SHIFT_LOCK_SHIFTED);
// // Press/release letter key, remain in manual shifted.
// chordingPressAndReleaseKey('A', ALPHABET_SHIFT_LOCK_SHIFTED, ALPHABET_SHIFT_LOCK_SHIFTED);
// // Release shift key, back to shift locked (not alphabet).
// releaseKey(CODE_SHIFT, ALPHABET_SHIFT_LOCKED);
// // Long press shift key, enter alphabet
// longPressAndReleaseKey(CODE_SHIFT, ALPHABET_SHIFT_LOCK_SHIFTED, ALPHABET_SHIFT_LOCK_SHIFTED,
// ALPHABET_UNSHIFTED);
//
// // Press/release shift key, enter alphabet shifted.
// pressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED);
// // Long press shift key, enter maybe alphabet.
// longPressKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED);
// // Press/release letter key, remain in manual shifted.
// chordingPressAndReleaseKey('A', ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED);
// // Release shift key, back to alphabet shifted (not alphabet).
// releaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED);
//
// // Set capitalize the first character of all words mode.
// setAutoCapsMode(CAP_MODE_WORDS);
// // Load keyboard, should be in automatic shifted.
// loadKeyboard(ALPHABET_AUTOMATIC_SHIFTED);
// // Long press shift key, enter maybe shift locked.
// longPressKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED);
// // Press/release letter key, remain in manual shifted.
// chordingPressAndReleaseKey('A', ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED);
// // Release shift key, back to alphabet (not shift locked).
// releaseKey(CODE_SHIFT, ALPHABET_UNSHIFTED);
// Long press shift key, enter maybe shift locked.
longPressKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED);
// Press/release letter key, remain in manual shifted.
chordingPressAndReleaseKey('A', ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED);
// Release shift key, back to alphabet (not shift locked).
releaseKey(CODE_SHIFT, ALPHABET_UNSHIFTED);
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Long press shift key, enter maybe alphabet.
longPressKey(CODE_SHIFT, ALPHABET_SHIFT_LOCK_SHIFTED, ALPHABET_SHIFT_LOCK_SHIFTED);
// Press/release letter key, remain in manual shifted.
chordingPressAndReleaseKey('A', ALPHABET_SHIFT_LOCK_SHIFTED, ALPHABET_SHIFT_LOCK_SHIFTED);
// Release shift key, back to shift locked (not alphabet).
releaseKey(CODE_SHIFT, ALPHABET_SHIFT_LOCKED);
// Long press shift key, enter alphabet
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_SHIFT_LOCK_SHIFTED, ALPHABET_SHIFT_LOCK_SHIFTED,
ALPHABET_UNSHIFTED);
// Press/release shift key, enter alphabet shifted.
pressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED);
// Long press shift key, enter maybe alphabet.
longPressKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED);
// Press/release letter key, remain in manual shifted.
chordingPressAndReleaseKey('A', ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED);
// Release shift key, back to alphabet shifted (not alphabet).
releaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED);
// Set capitalize the first character of all words mode.
setAutoCapsMode(CAP_MODE_WORDS);
// Load keyboard, should be in automatic shifted.
loadKeyboard(ALPHABET_AUTOMATIC_SHIFTED);
// Long press shift key, enter maybe shift locked.
longPressKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED);
// Press/release letter key, remain in manual shifted.
chordingPressAndReleaseKey('A', ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED);
// Release shift key, back to alphabet (not shift locked).
releaseKey(CODE_SHIFT, ALPHABET_UNSHIFTED);
}
}

View File

@ -88,7 +88,7 @@ public class KeyboardStateSingleTouchTests extends KeyboardStateTestsBase {
// Switching between alphabet shift locked and symbols.
public void testAlphabetShiftLockedAndSymbols() {
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Press/release "?123" key, enter into symbols.
@ -130,7 +130,7 @@ public class KeyboardStateSingleTouchTests extends KeyboardStateTestsBase {
// Automatic switch back to alphabet shift locked test by space key.
public void testSwitchBackBySpaceShiftLocked() {
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Press/release "?123" key, enter into symbols.
@ -183,7 +183,7 @@ public class KeyboardStateSingleTouchTests extends KeyboardStateTestsBase {
setLayoutSwitchBackSymbols(switchBackSymbols);
loadKeyboard(ALPHABET_UNSHIFTED);
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Press/release "?123" key, enter into symbols.
@ -246,13 +246,13 @@ public class KeyboardStateSingleTouchTests extends KeyboardStateTestsBase {
// Load keyboard, should be in alphabet.
loadKeyboard(ALPHABET_UNSHIFTED);
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Press/release shift key, back to alphabet.
pressAndReleaseKey(CODE_SHIFT, ALPHABET_SHIFT_LOCK_SHIFTED, ALPHABET_UNSHIFTED);
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Press/release letter key, remain in shift locked.
pressAndReleaseKey('A', ALPHABET_SHIFT_LOCKED, ALPHABET_SHIFT_LOCKED);
@ -262,16 +262,16 @@ public class KeyboardStateSingleTouchTests extends KeyboardStateTestsBase {
pressAndReleaseKey(CODE_SHIFT, ALPHABET_SHIFT_LOCK_SHIFTED, ALPHABET_UNSHIFTED);
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Long press shift key, back to alphabet.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_SHIFT_LOCK_SHIFTED, ALPHABET_UNSHIFTED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_SHIFT_LOCK_SHIFTED, ALPHABET_SHIFT_LOCK_SHIFTED,
ALPHABET_UNSHIFTED);
// Press/release shift key, enter alphabet shifted.
pressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED);
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Press/release shift key, back to alphabet.
pressAndReleaseKey(CODE_SHIFT, ALPHABET_SHIFT_LOCK_SHIFTED, ALPHABET_UNSHIFTED);
@ -281,7 +281,7 @@ public class KeyboardStateSingleTouchTests extends KeyboardStateTestsBase {
// Load keyboard, should be in automatic shifted.
loadKeyboard(ALPHABET_AUTOMATIC_SHIFTED);
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Press/release shift key, back to alphabet.
pressAndReleaseKey(CODE_SHIFT, ALPHABET_SHIFT_LOCK_SHIFTED, ALPHABET_UNSHIFTED);
@ -343,12 +343,12 @@ public class KeyboardStateSingleTouchTests extends KeyboardStateTestsBase {
updateShiftState(ALPHABET_UNSHIFTED);
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Update shift state, remained in alphabet shift locked.
updateShiftState(ALPHABET_SHIFT_LOCKED);
// Long press shift key, back to alphabet.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_SHIFT_LOCK_SHIFTED, ALPHABET_UNSHIFTED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_SHIFT_LOCK_SHIFTED, ALPHABET_SHIFT_LOCK_SHIFTED,
ALPHABET_UNSHIFTED);
// Press/release "?123" key, enter into symbols.
@ -376,12 +376,12 @@ public class KeyboardStateSingleTouchTests extends KeyboardStateTestsBase {
updateShiftState(ALPHABET_AUTOMATIC_SHIFTED);
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Update shift state, remained in alphabet shift locked (not automatic shifted).
updateShiftState(ALPHABET_SHIFT_LOCKED);
// Long press shift key, back to alphabet.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_SHIFT_LOCK_SHIFTED, ALPHABET_UNSHIFTED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_SHIFT_LOCK_SHIFTED, ALPHABET_SHIFT_LOCK_SHIFTED,
ALPHABET_UNSHIFTED);
// Load keyboard, should be in automatic shifted.
@ -429,7 +429,7 @@ public class KeyboardStateSingleTouchTests extends KeyboardStateTestsBase {
// Alphabet shift locked -> shift key + letter -> alphabet shift locked.
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Press and slide from "123?" key, enter symbols.
pressAndSlideFromKey(CODE_SYMBOL, SYMBOLS_UNSHIFTED, SYMBOLS_UNSHIFTED);
@ -481,7 +481,7 @@ public class KeyboardStateSingleTouchTests extends KeyboardStateTestsBase {
// Load keyboard
loadKeyboard(ALPHABET_UNSHIFTED);
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Press/release "?123" key, enter into symbols.
pressAndReleaseKey(CODE_SYMBOL, SYMBOLS_UNSHIFTED, SYMBOLS_UNSHIFTED);
@ -497,7 +497,7 @@ public class KeyboardStateSingleTouchTests extends KeyboardStateTestsBase {
// Load keyboard
loadKeyboard(ALPHABET_UNSHIFTED);
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Press/release "?123" key, enter into symbols.
pressAndReleaseKey(CODE_SYMBOL, SYMBOLS_UNSHIFTED, SYMBOLS_UNSHIFTED);
@ -551,7 +551,7 @@ public class KeyboardStateSingleTouchTests extends KeyboardStateTestsBase {
// Load keyboard
loadKeyboard(ALPHABET_UNSHIFTED);
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Press/release "?123" key, enter into symbols.
pressAndReleaseKey(CODE_SYMBOL, SYMBOLS_UNSHIFTED, SYMBOLS_UNSHIFTED);
@ -569,7 +569,7 @@ public class KeyboardStateSingleTouchTests extends KeyboardStateTestsBase {
// Load keyboard
loadKeyboard(ALPHABET_UNSHIFTED);
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Press/release "?123" key, enter into symbols.
pressAndReleaseKey(CODE_SYMBOL, SYMBOLS_UNSHIFTED, SYMBOLS_UNSHIFTED);
@ -591,7 +591,7 @@ public class KeyboardStateSingleTouchTests extends KeyboardStateTestsBase {
loadKeyboard(ALPHABET_UNSHIFTED);
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Change focus to new text field.
loadKeyboard(ALPHABET_UNSHIFTED);
@ -622,7 +622,7 @@ public class KeyboardStateSingleTouchTests extends KeyboardStateTestsBase {
loadKeyboard(ALPHABET_AUTOMATIC_SHIFTED);
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Change focus to new text field.
loadKeyboard(ALPHABET_AUTOMATIC_SHIFTED);
@ -655,7 +655,7 @@ public class KeyboardStateSingleTouchTests extends KeyboardStateTestsBase {
// Alphabet shift locked -> rotate -> alphabet shift locked.
// Long press shift key, enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Rotate device, remain in alphabet shift locked.
rotateDevice(ALPHABET_SHIFT_LOCKED);
@ -739,7 +739,7 @@ public class KeyboardStateSingleTouchTests extends KeyboardStateTestsBase {
secondPressAndReleaseKey('J', ALPHABET_MANUAL_SHIFTED, ALPHABET_UNSHIFTED);
// Long press shift key to enter alphabet shift locked.
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_SHIFT_LOCKED,
longPressAndReleaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED,
ALPHABET_SHIFT_LOCKED);
// Press/release shift key
pressAndReleaseKey(CODE_SHIFT, ALPHABET_SHIFT_LOCK_SHIFTED, ALPHABET_UNSHIFTED);