diff --git a/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboardJSHandler.java b/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboardJSHandler.java index 66af2ebe07d..3a995560c6f 100644 --- a/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboardJSHandler.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboardJSHandler.java @@ -167,11 +167,26 @@ public void run() { ic.performEditorAction(EditorInfo.IME_ACTION_SEARCH); break; + // Send action + case SEND : + ic.performEditorAction(EditorInfo.IME_ACTION_SEND); + break; + + // Next action + case NEXT : + ic.performEditorAction(EditorInfo.IME_ACTION_NEXT); + break; + // Done action case DONE : ic.performEditorAction(EditorInfo.IME_ACTION_DONE); break; + // Previous action + case PREVIOUS : + ic.performEditorAction(EditorInfo.IME_ACTION_PREVIOUS); + break; + // Messaging apps case NEWLINE : // Send newline without advancing cursor diff --git a/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java b/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java index adf9d30737d..0bbe93b9320 100644 --- a/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java @@ -184,8 +184,11 @@ public String toString() { public enum EnterModeType { GO, // Go action SEARCH, // Search action - NEWLINE, // Send newline character + SEND, // Send action + NEXT, // Next action DONE, // Done action + PREVIOUS, // Previous action + NEWLINE, // Send newline character DEFAULT, // Default ENTER action } @@ -1287,10 +1290,22 @@ public static void setEnterMode(int imeOptions, int inputType) { value = EnterModeType.SEARCH; break; + case EditorInfo.IME_ACTION_SEND: + value = EnterModeType.SEND; + break; + + case EditorInfo.IME_ACTION_NEXT: + value = EnterModeType.NEXT; + break; + case EditorInfo.IME_ACTION_DONE: value = EnterModeType.DONE; break; + case EditorInfo.IME_ACTION_PREVIOUS: + value = EnterModeType.PREVIOUS; + break; + default: value = EnterModeType.DEFAULT; }