diff options
author | 2010-09-01 06:40:26 -0700 | |
---|---|---|
committer | 2010-09-01 06:40:26 -0700 | |
commit | f3231f45310ae28b78662ae39b1961d80b3b01f8 (patch) | |
tree | d01646215bf4640eec3e2a6887acaa212b74e5ec /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | fb82afd48b6882cbdbb6477dca9526cd22d69400 (diff) | |
parent | 681b102a492b7d5301c1ca87985b4c391eb5eb14 (diff) | |
download | latinime-f3231f45310ae28b78662ae39b1961d80b3b01f8.tar.gz latinime-f3231f45310ae28b78662ae39b1961d80b3b01f8.tar.xz latinime-f3231f45310ae28b78662ae39b1961d80b3b01f8.zip |
am 681b102a: Track all pointers events
Merge commit '681b102a492b7d5301c1ca87985b4c391eb5eb14' into gingerbread-plus-aosp
* commit '681b102a492b7d5301c1ca87985b4c391eb5eb14':
Track all pointers events
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 21 |
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) { |