Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Fixes #3637 Null check the alphabetic Caps Keyboard when switching sh…
Browse files Browse the repository at this point in the history
…ift (#3639)

* Null check the alphabetic Caps Keyboard when switching shift

* Return to alphabetic Thai keyboard after inserting a character
  • Loading branch information
keianhzo authored and bluemarvin committed Jul 7, 2020
1 parent 19a1cfe commit fcce8d1
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,10 @@ private void handleShift(boolean isShifted) {

if (mKeyboardView.getKeyboard() != getSymbolsKeyboard()) {
if (isShifted || mIsCapsLock) {
mKeyboardView.setKeyboard(mCurrentKeyboard.getAlphabeticCapKeyboard());
if (mCurrentKeyboard.getAlphabeticCapKeyboard() != null) {
mKeyboardView.setKeyboard(mCurrentKeyboard.getAlphabeticCapKeyboard());
}

} else {
mKeyboardView.setKeyboard(mCurrentKeyboard.getAlphabeticKeyboard());
}
Expand Down Expand Up @@ -1046,7 +1049,7 @@ private void handleText(String aText, boolean skipCase) {
postInputCommand(() -> connection.commitText(text, 1));
}

if (!mIsCapsLock && mCurrentKeyboard.getAlphabeticCapKeyboard() == null) {
if (!mIsCapsLock) {
handleShift(false);
}

Expand Down

0 comments on commit fcce8d1

Please sign in to comment.