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/KeyModifier.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/KeyModifier.java')
| -rw-r--r-- | srcs/juloo.keyboard2/KeyModifier.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/srcs/juloo.keyboard2/KeyModifier.java b/srcs/juloo.keyboard2/KeyModifier.java index 1529835..392b740 100644 --- a/srcs/juloo.keyboard2/KeyModifier.java +++ b/srcs/juloo.keyboard2/KeyModifier.java @@ -70,6 +70,16 @@ class KeyModifier /** Modify a key after a long press. */ public static KeyValue modify_long_press(KeyValue k) { + switch (k.getKind()) + { + case Event: + switch (k.getEvent()) + { + case CHANGE_METHOD_PREV: + return KeyValue.getKeyByName("change_method"); + } + break; + } return k; } |
