diff options
author | 2013-02-19 11:45:44 -0800 | |
---|---|---|
committer | 2013-02-22 16:01:37 -0800 | |
commit | 4e4f88127b6a75302fac3a004e41fff1899a773f (patch) | |
tree | f37956c103dceb85ed283943acfdb80e4792b020 /java/src/com/android/inputmethod/event/HardwareKeyboardEventDecoder.java | |
parent | c3252cfaf750d706f7280d32d1259e4367670bd9 (diff) | |
download | latinime-4e4f88127b6a75302fac3a004e41fff1899a773f.tar.gz latinime-4e4f88127b6a75302fac3a004e41fff1899a773f.tar.xz latinime-4e4f88127b6a75302fac3a004e41fff1899a773f.zip |
Fix how the Enter action is decided
This unifies the software and hardware keyboard code
under a single decision process that works.
Bug: 8129303
Bug: 8152758
Change-Id: I7574c563d5f957d57bfe62fe5e3eec59a519d335
Diffstat (limited to 'java/src/com/android/inputmethod/event/HardwareKeyboardEventDecoder.java')
-rw-r--r-- | java/src/com/android/inputmethod/event/HardwareKeyboardEventDecoder.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/event/HardwareKeyboardEventDecoder.java b/java/src/com/android/inputmethod/event/HardwareKeyboardEventDecoder.java index a2463c20c..720d07433 100644 --- a/java/src/com/android/inputmethod/event/HardwareKeyboardEventDecoder.java +++ b/java/src/com/android/inputmethod/event/HardwareKeyboardEventDecoder.java @@ -58,11 +58,11 @@ public class HardwareKeyboardEventDecoder implements HardwareEventDecoder { } if (KeyEvent.KEYCODE_ENTER == keyCode) { // The Enter key. If the Shift key is not being pressed, this should send a - // CODE_ACTION_ENTER to trigger the action if any, or a carriage return - // otherwise. If the Shift key is depressed, this should send a - // CODE_SHIFT_ENTER and let Latin IME decide what to do with it. + // CODE_ENTER to trigger the action if any, or a carriage return otherwise. If the + // Shift key is being pressed, this should send a CODE_SHIFT_ENTER and let + // Latin IME decide what to do with it. return Event.createCommittableEvent(keyEvent.isShiftPressed() - ? Constants.CODE_SHIFT_ENTER : Constants.CODE_ACTION_ENTER, + ? Constants.CODE_SHIFT_ENTER : Constants.CODE_ENTER, null /* next */); } // If not Enter, then we have a committable character. This should be committed |