abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/Config.java
diff options
context:
space:
mode:
authorJules Aguillon2023-08-06 01:30:02 +0200
committerJules Aguillon2023-08-06 17:14:23 +0200
commitcd95c589de20a2d296e0cd2816ab8b5dadeb1a89 (patch)
tree7e0a6b46984e2f5e5c77c09b8e5bf707bf2f9e19 /srcs/juloo.keyboard2/Config.java
parent0924df8d13d9c6b9a9c25084246c19274e69df50 (diff)
downloadunexpected-keyboard-cd95c589de20a2d296e0cd2816ab8b5dadeb1a89.tar.gz
unexpected-keyboard-cd95c589de20a2d296e0cd2816ab8b5dadeb1a89.zip
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.
Diffstat (limited to 'srcs/juloo.keyboard2/Config.java')
-rw-r--r--srcs/juloo.keyboard2/Config.java9
1 files changed, 8 insertions, 1 deletions
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<KeyValue> extra_keys = new HashSet<KeyValue>();
final Set<KeyValue> remove_keys = new HashSet<KeyValue>();
if (extra_keys_subtype != null)
- extra_keys_subtype.compute(extra_keys, kw.script);
+ {
+ Set<KeyValue> present = new HashSet<KeyValue>();
+ 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;