aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2013-06-05 02:19:01 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-06-05 02:19:02 +0000
commit0bfc2bc419e7e758c6ce17b5fb959687f583551a (patch)
tree2c429078fce295f10a8aa35e91644022bd2512db /java/src/com/android/inputmethod/latin/LatinIME.java
parentad0c6d7b3635f0c1d92a3e4d895909234b7a2f0d (diff)
parent9552badf3c24d2098d227b0ddca0721b928a10b1 (diff)
downloadlatinime-0bfc2bc419e7e758c6ce17b5fb959687f583551a.tar.gz
latinime-0bfc2bc419e7e758c6ce17b5fb959687f583551a.tar.xz
latinime-0bfc2bc419e7e758c6ce17b5fb959687f583551a.zip
Merge "Add CODE_CAPSLOCK for long press shift key"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 98008ac1c..0bf167fd4 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1420,8 +1420,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
LatinImeLogger.logOnDelete(x, y);
break;
case Constants.CODE_SHIFT:
- // Note: calling back to the keyboard on Shift key is handled in onPressKey()
- // and onReleaseKey().
+ // Note: Calling back to the keyboard on Shift key is handled in
+ // {@link #onPressKey(int,boolean)} and {@link #onReleaseKey(int,boolean)}.
final Keyboard currentKeyboard = switcher.getKeyboard();
if (null != currentKeyboard && currentKeyboard.mId.isAlphabetKeyboard()) {
// TODO: Instead of checking for alphabetic keyboard here, separate keycodes for
@@ -1429,9 +1429,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
handleRecapitalize();
}
break;
+ case Constants.CODE_CAPSLOCK:
+ // Note: Changing keyboard to shift lock state is handled in
+ // {@link KeyboardSwitcher#onCodeInput(int)}.
+ break;
case Constants.CODE_SWITCH_ALPHA_SYMBOL:
- // Note: calling back to the keyboard on symbol key is handled in onPressKey()
- // and onReleaseKey().
+ // Note: Calling back to the keyboard on symbol key is handled in
+ // {@link #onPressKey(int,boolean)} and {@link #onReleaseKey(int,boolean)}.
break;
case Constants.CODE_SETTINGS:
onSettingsKeyPressed();
@@ -1484,8 +1488,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
break;
}
switcher.onCodeInput(primaryCode);
- // Reset after any single keystroke, except shift and symbol-shift
+ // Reset after any single keystroke, except shift, capslock, and symbol-shift
if (!didAutoCorrect && primaryCode != Constants.CODE_SHIFT
+ && primaryCode != Constants.CODE_CAPSLOCK
&& primaryCode != Constants.CODE_SWITCH_ALPHA_SYMBOL)
mLastComposedWord.deactivate();
if (Constants.CODE_DELETE != primaryCode) {