Loading java/res/xml/key_styles_enter.xml +1 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,7 @@ latin:parentStyle="defaultEnterKeyStyle" /> <key-style latin:styleName="defaultActionEnterKeyStyle" latin:code="!code/key_action_enter" latin:code="!code/key_enter" latin:keyIcon="!icon/undefined" latin:backgroundType="action" latin:parentStyle="defaultEnterKeyStyle" /> Loading java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java +3 −1 Original line number Diff line number Diff line Loading @@ -110,7 +110,9 @@ public final class KeyCodeDescriptionMapper { return getDescriptionForShiftKey(context, keyboard); } if (code == Constants.CODE_ACTION_ENTER) { if (code == Constants.CODE_ENTER) { // The following function returns the correct description in all action and // regular enter cases, taking care of all modes. return getDescriptionForActionKey(context, keyboard, key); } Loading java/src/com/android/inputmethod/event/HardwareKeyboardEventDecoder.java +4 −4 Original line number Diff line number Diff line Loading @@ -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 Loading java/src/com/android/inputmethod/keyboard/internal/KeyboardCodesSet.java +1 −4 Original line number Diff line number Diff line Loading @@ -48,7 +48,6 @@ public final class KeyboardCodesSet { "key_delete", "key_settings", "key_shortcut", "key_action_enter", "key_action_next", "key_action_previous", "key_shift_enter", Loading Loading @@ -85,7 +84,6 @@ public final class KeyboardCodesSet { Constants.CODE_DELETE, Constants.CODE_SETTINGS, Constants.CODE_SHORTCUT, Constants.CODE_ACTION_ENTER, Constants.CODE_ACTION_NEXT, Constants.CODE_ACTION_PREVIOUS, Constants.CODE_SHIFT_ENTER, Loading Loading @@ -118,7 +116,6 @@ public final class KeyboardCodesSet { DEFAULT[12], DEFAULT[13], DEFAULT[14], DEFAULT[15], CODE_RIGHT_PARENTHESIS, CODE_LEFT_PARENTHESIS, CODE_GREATER_THAN_SIGN, Loading @@ -142,7 +139,7 @@ public final class KeyboardCodesSet { }; static { if (DEFAULT.length != RTL.length) { if (DEFAULT.length != RTL.length || DEFAULT.length != ID_TO_NAME.length) { throw new RuntimeException("Internal inconsistency"); } for (int i = 0; i < ID_TO_NAME.length; i++) { Loading java/src/com/android/inputmethod/latin/Constants.java +6 −8 Original line number Diff line number Diff line Loading @@ -179,14 +179,13 @@ public final class Constants { public static final int CODE_DELETE = -4; public static final int CODE_SETTINGS = -5; public static final int CODE_SHORTCUT = -6; public static final int CODE_ACTION_ENTER = -7; public static final int CODE_ACTION_NEXT = -8; public static final int CODE_ACTION_PREVIOUS = -9; public static final int CODE_LANGUAGE_SWITCH = -10; public static final int CODE_RESEARCH = -11; public static final int CODE_SHIFT_ENTER = -12; public static final int CODE_ACTION_NEXT = -7; public static final int CODE_ACTION_PREVIOUS = -8; public static final int CODE_LANGUAGE_SWITCH = -9; public static final int CODE_RESEARCH = -10; public static final int CODE_SHIFT_ENTER = -11; // Code value representing the code is not specified. public static final int CODE_UNSPECIFIED = -13; public static final int CODE_UNSPECIFIED = -12; public static boolean isLetterCode(final int code) { return code >= CODE_SPACE; Loading @@ -200,7 +199,6 @@ public final class Constants { case CODE_DELETE: return "delete"; case CODE_SETTINGS: return "settings"; case CODE_SHORTCUT: return "shortcut"; case CODE_ACTION_ENTER: return "actionEnter"; case CODE_ACTION_NEXT: return "actionNext"; case CODE_ACTION_PREVIOUS: return "actionPrevious"; case CODE_LANGUAGE_SWITCH: return "languageSwitch"; Loading Loading
java/res/xml/key_styles_enter.xml +1 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,7 @@ latin:parentStyle="defaultEnterKeyStyle" /> <key-style latin:styleName="defaultActionEnterKeyStyle" latin:code="!code/key_action_enter" latin:code="!code/key_enter" latin:keyIcon="!icon/undefined" latin:backgroundType="action" latin:parentStyle="defaultEnterKeyStyle" /> Loading
java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java +3 −1 Original line number Diff line number Diff line Loading @@ -110,7 +110,9 @@ public final class KeyCodeDescriptionMapper { return getDescriptionForShiftKey(context, keyboard); } if (code == Constants.CODE_ACTION_ENTER) { if (code == Constants.CODE_ENTER) { // The following function returns the correct description in all action and // regular enter cases, taking care of all modes. return getDescriptionForActionKey(context, keyboard, key); } Loading
java/src/com/android/inputmethod/event/HardwareKeyboardEventDecoder.java +4 −4 Original line number Diff line number Diff line Loading @@ -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 Loading
java/src/com/android/inputmethod/keyboard/internal/KeyboardCodesSet.java +1 −4 Original line number Diff line number Diff line Loading @@ -48,7 +48,6 @@ public final class KeyboardCodesSet { "key_delete", "key_settings", "key_shortcut", "key_action_enter", "key_action_next", "key_action_previous", "key_shift_enter", Loading Loading @@ -85,7 +84,6 @@ public final class KeyboardCodesSet { Constants.CODE_DELETE, Constants.CODE_SETTINGS, Constants.CODE_SHORTCUT, Constants.CODE_ACTION_ENTER, Constants.CODE_ACTION_NEXT, Constants.CODE_ACTION_PREVIOUS, Constants.CODE_SHIFT_ENTER, Loading Loading @@ -118,7 +116,6 @@ public final class KeyboardCodesSet { DEFAULT[12], DEFAULT[13], DEFAULT[14], DEFAULT[15], CODE_RIGHT_PARENTHESIS, CODE_LEFT_PARENTHESIS, CODE_GREATER_THAN_SIGN, Loading @@ -142,7 +139,7 @@ public final class KeyboardCodesSet { }; static { if (DEFAULT.length != RTL.length) { if (DEFAULT.length != RTL.length || DEFAULT.length != ID_TO_NAME.length) { throw new RuntimeException("Internal inconsistency"); } for (int i = 0; i < ID_TO_NAME.length; i++) { Loading
java/src/com/android/inputmethod/latin/Constants.java +6 −8 Original line number Diff line number Diff line Loading @@ -179,14 +179,13 @@ public final class Constants { public static final int CODE_DELETE = -4; public static final int CODE_SETTINGS = -5; public static final int CODE_SHORTCUT = -6; public static final int CODE_ACTION_ENTER = -7; public static final int CODE_ACTION_NEXT = -8; public static final int CODE_ACTION_PREVIOUS = -9; public static final int CODE_LANGUAGE_SWITCH = -10; public static final int CODE_RESEARCH = -11; public static final int CODE_SHIFT_ENTER = -12; public static final int CODE_ACTION_NEXT = -7; public static final int CODE_ACTION_PREVIOUS = -8; public static final int CODE_LANGUAGE_SWITCH = -9; public static final int CODE_RESEARCH = -10; public static final int CODE_SHIFT_ENTER = -11; // Code value representing the code is not specified. public static final int CODE_UNSPECIFIED = -13; public static final int CODE_UNSPECIFIED = -12; public static boolean isLetterCode(final int code) { return code >= CODE_SPACE; Loading @@ -200,7 +199,6 @@ public final class Constants { case CODE_DELETE: return "delete"; case CODE_SETTINGS: return "settings"; case CODE_SHORTCUT: return "shortcut"; case CODE_ACTION_ENTER: return "actionEnter"; case CODE_ACTION_NEXT: return "actionNext"; case CODE_ACTION_PREVIOUS: return "actionPrevious"; case CODE_LANGUAGE_SWITCH: return "languageSwitch"; Loading