From cd95c589de20a2d296e0cd2816ab8b5dadeb1a89 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sun, 6 Aug 2023 01:30:02 +0200 Subject: Extra keys alternatives For each extra key, a list of alternative can be specified. An extra key won't be added to the keyboard if all its alternatives are already present on it. This is useful to avoid having the dead key for an accent and the accented letters at the same time. --- srcs/juloo.keyboard2/Keyboard2.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'srcs/juloo.keyboard2/Keyboard2.java') diff --git a/srcs/juloo.keyboard2/Keyboard2.java b/srcs/juloo.keyboard2/Keyboard2.java index 1b59e5e..77c2c15 100644 --- a/srcs/juloo.keyboard2/Keyboard2.java +++ b/srcs/juloo.keyboard2/Keyboard2.java @@ -114,9 +114,8 @@ public class Keyboard2 extends InputMethodService { String extra_keys = subtype.getExtraValueOf("extra_keys"); String script = subtype.getExtraValueOf("script"); - if (extra_keys == null) - return; - dst.add_keys_for_script(script, ExtraKeys.parse_extra_keys(extra_keys)); + if (extra_keys != null) + dst.parse_and_add_keys_for_script(script, extra_keys); } private void refreshAccentsOption(InputMethodManager imm, InputMethodSubtype subtype) -- cgit v1.2.3