mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-26 10:17:41 +00:00
Merge pull request #12745 from keymanapp/feat/fv/enter-key
feat(android): Enhance how ENTER key is handled for FV and KMSample2
This commit is contained in:
commit
7794d2d97b
2 changed files with 9 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue