From 4e4f88127b6a75302fac3a004e41fff1899a773f Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Tue, 19 Feb 2013 11:45:44 -0800 Subject: 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 --- .../android/inputmethod/event/HardwareKeyboardEventDecoder.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'java/src/com/android/inputmethod/event/HardwareKeyboardEventDecoder.java') 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 -- cgit v1.2.3-83-g751a