diff options
author | 2013-12-27 19:06:45 +0900 | |
---|---|---|
committer | 2014-01-23 13:10:02 +0900 | |
commit | eb6d41a525b08c1dc347e604e366021a807a367c (patch) | |
tree | 53c582eeccbfd6a5db3686155c3f195d386a6eb4 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | ab80b41a0dee298837b1358457768ee5ac0fc79e (diff) | |
download | latinime-eb6d41a525b08c1dc347e604e366021a807a367c.tar.gz latinime-eb6d41a525b08c1dc347e604e366021a807a367c.tar.xz latinime-eb6d41a525b08c1dc347e604e366021a807a367c.zip |
[IL67] Externalize a call to the keyboard switcher
Bug: 8636060
Change-Id: Ib13a54854e30afb79217a0a1f2aeca50a95ba155
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 399d4917c..97fa90eec 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1260,7 +1260,20 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // this transformation, it should be done already before calling onCodeInput. final int keyX = mainKeyboardView.getKeyX(x); final int keyY = mainKeyboardView.getKeyY(y); - mInputLogic.onCodeInput(codePoint, keyX, keyY, mHandler, mKeyboardSwitcher, + final int codeToSend; + if (Constants.CODE_SHIFT == codePoint) { + // TODO: Instead of checking for alphabetic keyboard here, separate keycodes for + // alphabetic shift and shift while in symbol layout. + final Keyboard currentKeyboard = mKeyboardSwitcher.getKeyboard(); + if (null != currentKeyboard && currentKeyboard.mId.isAlphabetKeyboard()) { + codeToSend = codePoint; + } else { + codeToSend = Constants.CODE_SYMBOL_SHIFT; + } + } else { + codeToSend = codePoint; + } + mInputLogic.onCodeInput(codeToSend, keyX, keyY, mHandler, mKeyboardSwitcher, mSubtypeSwitcher); mKeyboardSwitcher.onCodeInput(codePoint); } |