mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-29 03:37:42 +00:00
fix(android): Add SEND, NEXT, PREVIOUS actions
This commit is contained in:
parent
74011e2d09
commit
786a1063ea
2 changed files with 31 additions and 1 deletions
|
|
@ -167,11 +167,26 @@ public class KMKeyboardJSHandler {
|
|||
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
|
||||
|
|
|
|||
|
|
@ -184,8 +184,11 @@ public final class KMManager {
|
|||
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 final class KMManager {
|
|||
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue