am b172725c: am 7d045829: Request update shift state after shift-chording input
* commit 'b172725c8dc26bc96667135d1b17396f2a6257b4': Request update shift state after shift-chording inputmain
commit
7ba02315ab
|
@ -487,6 +487,11 @@ public final class KeyboardState {
|
||||||
// After chording input while normal state.
|
// After chording input while normal state.
|
||||||
setShifted(UNSHIFT);
|
setShifted(UNSHIFT);
|
||||||
}
|
}
|
||||||
|
// After chording input, automatic shift state may have been changed depending on
|
||||||
|
// what characters were input.
|
||||||
|
mShiftKeyState.onRelease();
|
||||||
|
mSwitchActions.requestUpdatingShiftState();
|
||||||
|
return;
|
||||||
} else if (mAlphabetShiftState.isShiftLockShifted() && withSliding) {
|
} else if (mAlphabetShiftState.isShiftLockShifted() && withSliding) {
|
||||||
// In shift locked state, shift has been pressed and slid out to other key.
|
// In shift locked state, shift has been pressed and slid out to other key.
|
||||||
setShiftLocked(true);
|
setShiftLocked(true);
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class KeyboardStateMultiTouchTests extends KeyboardStateTestsBase {
|
||||||
pressKey(CODE_SYMBOL, SYMBOLS_UNSHIFTED);
|
pressKey(CODE_SYMBOL, SYMBOLS_UNSHIFTED);
|
||||||
// Press/release symbol letter key.
|
// Press/release symbol letter key.
|
||||||
chordingPressAndReleaseKey('1', SYMBOLS_UNSHIFTED, SYMBOLS_UNSHIFTED);
|
chordingPressAndReleaseKey('1', SYMBOLS_UNSHIFTED, SYMBOLS_UNSHIFTED);
|
||||||
// Release "123?" key, switch back to alphabet shift unshifted.
|
// Release "123?" key, switch back to alphabet unshifted.
|
||||||
releaseKey(CODE_SYMBOL, ALPHABET_UNSHIFTED);
|
releaseKey(CODE_SYMBOL, ALPHABET_UNSHIFTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,7 +330,7 @@ public class KeyboardStateMultiTouchTests extends KeyboardStateTestsBase {
|
||||||
releaseKey('X', ALPHABET_MANUAL_SHIFTED);
|
releaseKey('X', ALPHABET_MANUAL_SHIFTED);
|
||||||
// Release 'Z' key
|
// Release 'Z' key
|
||||||
releaseKey('Z', ALPHABET_MANUAL_SHIFTED);
|
releaseKey('Z', ALPHABET_MANUAL_SHIFTED);
|
||||||
// Release shift key.
|
// Release shift key, switch back to alphabet shifted.
|
||||||
releaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED);
|
releaseKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -351,8 +351,24 @@ public class KeyboardStateMultiTouchTests extends KeyboardStateTestsBase {
|
||||||
releaseKey('X', ALPHABET_MANUAL_SHIFTED);
|
releaseKey('X', ALPHABET_MANUAL_SHIFTED);
|
||||||
// Release 'Z' key
|
// Release 'Z' key
|
||||||
releaseKey('Z', ALPHABET_MANUAL_SHIFTED);
|
releaseKey('Z', ALPHABET_MANUAL_SHIFTED);
|
||||||
// Release shift key.
|
// Release shift key, updated to alphabet unshifted.
|
||||||
releaseKey(CODE_SHIFT, ALPHABET_UNSHIFTED);
|
releaseKey(CODE_SHIFT, ALPHABET_UNSHIFTED);
|
||||||
|
|
||||||
|
// Update shift state with auto caps enabled.
|
||||||
|
pressAndReleaseKey(CODE_AUTO_CAPS_TRIGGER, ALPHABET_UNSHIFTED, ALPHABET_AUTOMATIC_SHIFTED);
|
||||||
|
|
||||||
|
// Press shift key and hold, switch to alphabet shifted.
|
||||||
|
pressKey(CODE_SHIFT, ALPHABET_MANUAL_SHIFTED);
|
||||||
|
// Press 'X' key and hold
|
||||||
|
chordingPressKey('X', ALPHABET_MANUAL_SHIFTED);
|
||||||
|
// Release 'X' key
|
||||||
|
releaseKey('X', ALPHABET_MANUAL_SHIFTED);
|
||||||
|
// Press key and hold, stays in alphabet shifted.
|
||||||
|
chordingPressKey(CODE_AUTO_CAPS_TRIGGER, ALPHABET_MANUAL_SHIFTED);
|
||||||
|
// Release 'Z' key
|
||||||
|
releaseKey(CODE_AUTO_CAPS_TRIGGER, ALPHABET_MANUAL_SHIFTED);
|
||||||
|
// Release shift key, updated to alphabet automatic shifted.
|
||||||
|
releaseKey(CODE_SHIFT, ALPHABET_AUTOMATIC_SHIFTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Multi touch shift chording input in capitalize character mode.
|
// Multi touch shift chording input in capitalize character mode.
|
||||||
|
@ -372,8 +388,8 @@ public class KeyboardStateMultiTouchTests extends KeyboardStateTestsBase {
|
||||||
releaseKey('X', ALPHABET_MANUAL_SHIFTED);
|
releaseKey('X', ALPHABET_MANUAL_SHIFTED);
|
||||||
// Release 'Z' key
|
// Release 'Z' key
|
||||||
releaseKey('Z', ALPHABET_MANUAL_SHIFTED);
|
releaseKey('Z', ALPHABET_MANUAL_SHIFTED);
|
||||||
// Release shift key.
|
// Release shift key, updated to alphabet automatic shifted.
|
||||||
releaseKey(CODE_SHIFT, ALPHABET_UNSHIFTED);
|
releaseKey(CODE_SHIFT, ALPHABET_AUTOMATIC_SHIFTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testLongPressShiftAndChording() {
|
public void testLongPressShiftAndChording() {
|
||||||
|
|
Loading…
Reference in New Issue