am 085b6594: Merge "Fix KeyboardState to pass KeyboardStateMultiTouchTests"
* commit '085b659463c41beb01950bf82334f451cca8ed2e': Fix KeyboardState to pass KeyboardStateMultiTouchTestsmain
commit
33b1944f92
|
@ -338,7 +338,11 @@ public class KeyboardState {
|
||||||
final boolean isShiftLocked = mAlphabetShiftState.isShiftLocked();
|
final boolean isShiftLocked = mAlphabetShiftState.isShiftLocked();
|
||||||
if (mShiftKeyState.isMomentary()) {
|
if (mShiftKeyState.isMomentary()) {
|
||||||
// After chording input while normal state.
|
// After chording input while normal state.
|
||||||
|
if (mAlphabetShiftState.isShiftLockShifted()) {
|
||||||
|
setShiftLocked(true);
|
||||||
|
} else {
|
||||||
setShifted(SwitchActions.UNSHIFT);
|
setShifted(SwitchActions.UNSHIFT);
|
||||||
|
}
|
||||||
} else if (isShiftLocked && !mAlphabetShiftState.isShiftLockShifted()
|
} else if (isShiftLocked && !mAlphabetShiftState.isShiftLockShifted()
|
||||||
&& (mShiftKeyState.isPressing() || mShiftKeyState.isPressingOnShifted())
|
&& (mShiftKeyState.isPressing() || mShiftKeyState.isPressingOnShifted())
|
||||||
&& !withSliding) {
|
&& !withSliding) {
|
||||||
|
|
|
@ -52,21 +52,18 @@ public class KeyboardStateMultiTouchTests extends KeyboardStateTestsBase {
|
||||||
chordingPressAndReleaseKey('Z', ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED);
|
chordingPressAndReleaseKey('Z', ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED);
|
||||||
chordingPressAndReleaseKey('X', ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED);
|
chordingPressAndReleaseKey('X', ALPHABET_MANUAL_SHIFTED, ALPHABET_MANUAL_SHIFTED);
|
||||||
|
|
||||||
// TODO: This test fails due to bug, though external behavior is correct.
|
// Release shift key, switch back to alphabet shift locked.
|
||||||
// // Release shift key, switch back to alphabet shift locked.
|
releaseKey(CODE_SHIFT, ALPHABET_SHIFT_LOCKED);
|
||||||
// releaseKey(CODE_SHIFT, ALPHABET_SHIFT_LOCKED);
|
|
||||||
releaseKey(CODE_SHIFT, ALPHABET_UNSHIFTED);
|
|
||||||
|
|
||||||
// TODO: This test fails due to bug, though external behavior is correct.
|
// Press symbols key and hold, enter into choring symbols state.
|
||||||
// // Press symbols key and hold, enter into choring symbols state.
|
pressKey(CODE_SYMBOL, SYMBOLS_UNSHIFTED);
|
||||||
// pressKey(CODE_SYMBOL, SYMBOLS_UNSHIFTED);
|
|
||||||
//
|
// Press/release symbol letter keys.
|
||||||
// // Press/release symbol letter keys.
|
chordingPressAndReleaseKey('1', SYMBOLS_UNSHIFTED, SYMBOLS_UNSHIFTED);
|
||||||
// chordingPressAndReleaseKey('1', SYMBOLS_UNSHIFTED, SYMBOLS_UNSHIFTED);
|
chordingPressAndReleaseKey('2', SYMBOLS_UNSHIFTED, SYMBOLS_UNSHIFTED);
|
||||||
// chordingPressAndReleaseKey('2', SYMBOLS_UNSHIFTED, SYMBOLS_UNSHIFTED);
|
|
||||||
//
|
// Release symbols key, switch back to alphabet shift locked.
|
||||||
// // Release symbols key, switch back to alphabet shift locked.
|
releaseKey(CODE_SYMBOL, ALPHABET_SHIFT_LOCKED);
|
||||||
// releaseKey(CODE_SYMBOL, ALPHABET_SHIFT_LOCKED);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Symbols key chording input.
|
// Symbols key chording input.
|
||||||
|
|
Loading…
Reference in New Issue