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/Config.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'srcs/juloo.keyboard2/Config.java') diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java index b38604b..53bd2d2 100644 --- a/srcs/juloo.keyboard2/Config.java +++ b/srcs/juloo.keyboard2/Config.java @@ -185,7 +185,14 @@ final class Config final Set extra_keys = new HashSet(); final Set remove_keys = new HashSet(); if (extra_keys_subtype != null) - extra_keys_subtype.compute(extra_keys, kw.script); + { + Set present = new HashSet(); + kw.getKeys(present); + present.addAll(extra_keys_param); + present.addAll(extra_keys_custom); + extra_keys_subtype.compute(extra_keys, + new ExtraKeys.Query(kw.script, present)); + } extra_keys.addAll(extra_keys_param); extra_keys.addAll(extra_keys_custom); boolean number_row = this.number_row && !show_numpad; -- cgit v1.2.3