diff options
| author | Jules Aguillon | 2023-02-12 23:20:11 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2023-02-12 23:20:11 +0100 |
| commit | 0f62b3044c501dc5679583e06447285ebeb31118 (patch) | |
| tree | cb3cd47834c464cf8884627fe1e350be03fb6b05 /srcs/juloo.keyboard2/KeyEventHandler.java | |
| parent | c46e3b6c619b6af5825161d4960ea4829a44d429 (diff) | |
| download | unexpected-keyboard-0f62b3044c501dc5679583e06447285ebeb31118.tar.gz unexpected-keyboard-0f62b3044c501dc5679583e06447285ebeb31118.zip | |
Option to switch to the previous input method
A new option changes the "change_method" into the new
"change_method_prev". It switch to the previously used input method.
A long press on "change_method_prev" sends "change_method".
A new section is added in the settings and existing options are moved.
Diffstat (limited to 'srcs/juloo.keyboard2/KeyEventHandler.java')
| -rw-r--r-- | srcs/juloo.keyboard2/KeyEventHandler.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/srcs/juloo.keyboard2/KeyEventHandler.java b/srcs/juloo.keyboard2/KeyEventHandler.java index 5b0762e..1a591c8 100644 --- a/srcs/juloo.keyboard2/KeyEventHandler.java +++ b/srcs/juloo.keyboard2/KeyEventHandler.java @@ -48,7 +48,8 @@ class KeyEventHandler implements Config.IKeyEventHandler case SWITCH_NUMERIC: _recv.set_layout(Layout.Numeric); break; case SWITCH_EMOJI: _recv.setPane_emoji(); break; case SWITCH_BACK_EMOJI: _recv.setPane_normal(); break; - case CHANGE_METHOD: _recv.switchToNextInputMethod(); break; + case CHANGE_METHOD: _recv.switchInputMethod(); break; + case CHANGE_METHOD_PREV: _recv.switchToPrevInputMethod(); break; case ACTION: InputConnection conn = _recv.getCurrentInputConnection(); if (conn != null) @@ -179,7 +180,8 @@ class KeyEventHandler implements Config.IKeyEventHandler public static interface IReceiver { - public void switchToNextInputMethod(); + public void switchInputMethod(); + public void switchToPrevInputMethod(); public void setPane_emoji(); public void setPane_normal(); public void showKeyboardConfig(); |
