Exit shift-symbol view on space

This commit is contained in:
Helium314 2023-06-26 15:29:40 +02:00
parent 7b743db65a
commit 0f585f9f1b
2 changed files with 15 additions and 2 deletions

View file

@ -30,9 +30,10 @@ Changes:
* add Arabic dictionary for download, from https://github.com/remi0s/aosp-dictionary-tools/blob/master/dictsCreated/WikiAndOpenSubtitles/ar_wordlist.combined / https://github.com/openboard-team/openboard/pull/450 * add Arabic dictionary for download, from https://github.com/remi0s/aosp-dictionary-tools/blob/master/dictsCreated/WikiAndOpenSubtitles/ar_wordlist.combined / https://github.com/openboard-team/openboard/pull/450
* add Hebrew dictionary for download, from https://github.com/Hananel-Hazan/aosp-dictionary-tools/blob/master/hebrew-hspell.txt.combined.new / https://github.com/openboard-team/openboard/pull/300 * add Hebrew dictionary for download, from https://github.com/Hananel-Hazan/aosp-dictionary-tools/blob/master/hebrew-hspell.txt.combined.new / https://github.com/openboard-team/openboard/pull/300
* add Galician dictionary for download, from https://github.com/chavaone/openboard/blob/master/dictionaries/es_GL_wordlist.combined.gz / https://github.com/openboard-team/openboard/pull/291 * add Galician dictionary for download, from https://github.com/chavaone/openboard/blob/master/dictionaries/es_GL_wordlist.combined.gz / https://github.com/openboard-team/openboard/pull/291
* fix suggestions after some characters, https://github.com/openboard-team/openboard/pull/694, https://github.com/openboard-team/openboard/issues/795 * Fix suggestions after some characters, https://github.com/openboard-team/openboard/pull/694, https://github.com/openboard-team/openboard/issues/795
* fix suggestions sometimes not being shown, https://github.com/openboard-team/openboard/pull/709 * Fix suggestions sometimes not being shown, https://github.com/openboard-team/openboard/pull/709
* Reduce amount of unwanted automatic space insertions, https://github.com/openboard-team/openboard/pull/576 * Reduce amount of unwanted automatic space insertions, https://github.com/openboard-team/openboard/pull/576
* Exit shift-symbol view on space (same as normal symbol view)
----- -----

View file

@ -679,6 +679,12 @@ public final class KeyboardState {
// released. // released.
mSwitchState = SWITCH_STATE_SYMBOL_BEGIN; mSwitchState = SWITCH_STATE_SYMBOL_BEGIN;
} }
// Switch back to alpha keyboard mode if user types one or more non-space/enter
// characters followed by a space/enter.
if (isSpaceOrEnter(code)) {
toggleAlphabetAndSymbols(autoCapsFlags, recapitalizeMode);
mPrevSymbolsKeyboardWasShifted = false;
}
break; break;
case SWITCH_STATE_SYMBOL_BEGIN: case SWITCH_STATE_SYMBOL_BEGIN:
if (mMode == MODE_EMOJI || mMode == MODE_CLIPBOARD) { if (mMode == MODE_EMOJI || mMode == MODE_CLIPBOARD) {
@ -690,6 +696,12 @@ public final class KeyboardState {
|| code == Constants.CODE_OUTPUT_TEXT)) { || code == Constants.CODE_OUTPUT_TEXT)) {
mSwitchState = SWITCH_STATE_SYMBOL; mSwitchState = SWITCH_STATE_SYMBOL;
} }
// Switch back to alpha keyboard mode if user types one or more non-space/enter
// characters followed by a space/enter.
if (isSpaceOrEnter(code)) {
toggleAlphabetAndSymbols(autoCapsFlags, recapitalizeMode);
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