From 0f62b3044c501dc5679583e06447285ebeb31118 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sun, 12 Feb 2023 23:20:11 +0100 Subject: 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. --- srcs/juloo.keyboard2/KeyModifier.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'srcs/juloo.keyboard2/KeyModifier.java') 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; } -- cgit v1.2.3