aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java21
1 files changed, 7 insertions, 14 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 0896f6c2c..9312ce2c8 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -965,6 +965,7 @@ public class LatinIME extends InputMethodService
private void postUpdateShiftKeyState() {
mHandler.removeMessages(MSG_UPDATE_SHIFT_STATE);
+ // TODO: Should remove this 300ms delay?
mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_UPDATE_SHIFT_STATE), 300);
}
@@ -1090,7 +1091,7 @@ public class LatinIME extends InputMethodService
LatinImeLogger.logOnDelete();
break;
case Keyboard.KEYCODE_SHIFT:
- handleShift();
+ // Shift key is handled in onPress().
break;
case Keyboard.KEYCODE_CANCEL:
if (mOptionsDialog == null || !mOptionsDialog.isShowing()) {
@@ -1107,6 +1108,7 @@ public class LatinIME extends InputMethodService
toggleLanguage(false, false);
break;
case Keyboard.KEYCODE_MODE_CHANGE:
+ // TODO: Mode change (symbol key) should be handled in onPress().
changeKeyboardMode();
break;
case LatinKeyboardView.KEYCODE_VOICE:
@@ -1248,19 +1250,6 @@ public class LatinIME extends InputMethodService
}
}
- private void handleCapsLock() {
- mHandler.removeMessages(MSG_UPDATE_SHIFT_STATE);
- KeyboardSwitcher switcher = mKeyboardSwitcher;
- if (switcher.isAlphabetMode()) {
- mCapsLock = !mCapsLock;
- if (mCapsLock) {
- switcher.setShiftLocked(true);
- } else {
- switcher.setShifted(false);
- }
- }
- }
-
private void abortCorrection(boolean force) {
if (force || TextEntryState.isCorrecting()) {
getCurrentInputConnection().finishComposingText();
@@ -2157,6 +2146,10 @@ public class LatinIME extends InputMethodService
public void onPress(int primaryCode) {
vibrate();
playKeyClick(primaryCode);
+ if (primaryCode == Keyboard.KEYCODE_SHIFT) {
+ handleShift();
+ }
+ // TODO: We should handle KEYCODE_MODE_CHANGE (symbol) here as well.
}
public void onRelease(int primaryCode) {