diff --git a/android/Samples/KMSample2/app/src/main/java/com/keyman/kmsample2/SystemKeyboard.java b/android/Samples/KMSample2/app/src/main/java/com/keyman/kmsample2/SystemKeyboard.java index 4ad462a76c..438ed237db 100644 --- a/android/Samples/KMSample2/app/src/main/java/com/keyman/kmsample2/SystemKeyboard.java +++ b/android/Samples/KMSample2/app/src/main/java/com/keyman/kmsample2/SystemKeyboard.java @@ -130,6 +130,11 @@ public class SystemKeyboard extends InputMethodService implements OnKeyboardEven super.onStartInput(attribute, restarting); KMManager.onStartInput(attribute, restarting); KMManager.resetContext(KeyboardType.KEYBOARD_TYPE_SYSTEM); + + // Determine special handling for ENTER key + int inputType = attribute.inputType; + KMManager.setEnterMode(attribute.imeOptions, inputType); + // User switched to a new input field so we should extract the text from input field // and pass it to Keyman Engine together with selection range InputConnection ic = getCurrentInputConnection(); diff --git a/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/SystemKeyboard.java b/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/SystemKeyboard.java index f047bc6c78..0e2cffd68e 100644 --- a/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/SystemKeyboard.java +++ b/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/SystemKeyboard.java @@ -150,6 +150,10 @@ public class SystemKeyboard extends InputMethodService implements OnKeyboardEven KMManager.setBannerOptions(mayPredict); } } + + // Determine special handling for ENTER key + KMManager.setEnterMode(attribute.imeOptions, inputType); + // User switched to a new input field so we should extract the text from input field // and pass it to Keyman Engine together with selection range InputConnection ic = getCurrentInputConnection();