From 9bcfec8bd1c1662b250c0a313505aa6e0bc06383 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sat, 24 Jun 2023 23:29:24 +0200 Subject: Per-script extra keys Allows to define a locale's script in 'method.xml' and use that to add the extra keys for a locale to layouts of the same script only. A locale of an undefined script will add its extra keys to every layouts. A layout of an undefined script will have the extra keys of all the enabled locales. --- srcs/juloo.keyboard2/Config.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'srcs/juloo.keyboard2/Config.java') diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java index 8406be2..3e9d624 100644 --- a/srcs/juloo.keyboard2/Config.java +++ b/srcs/juloo.keyboard2/Config.java @@ -57,7 +57,7 @@ final class Config public String actionLabel; // Might be 'null' public int actionId; // Meaningful only when 'actionLabel' isn't 'null' public boolean swapEnterActionKey; // Swap the "enter" and "action" keys - public Set extra_keys_subtype; + public ExtraKeys extra_keys_subtype; public Set extra_keys_param; public final IKeyEventHandler handler; @@ -176,7 +176,7 @@ final class Config final Set extra_keys = new HashSet(); final Set remove_keys = new HashSet(); if (extra_keys_subtype != null) - extra_keys.addAll(extra_keys_subtype); + extra_keys_subtype.compute(extra_keys, kw.script); extra_keys.addAll(extra_keys_param); boolean number_row = this.number_row && !show_numpad; if (number_row) -- cgit v1.2.3