From ab987c776c7ddc0fab594f20f4ddf49d98848ccd Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Fri, 24 Jun 2022 20:26:27 +0200 Subject: Fix localized key not in predefined position The "loc " prefix for predefining a place for an "extra key" was broken since 31d6a70. The FLAG_LOCALIZED flag cannot be used anymore, as adding it to any key would turn it into a different key that wouldn't be recognized by parts of the code comparing the keys (placing the extra keys). Add an other layer in KeyboardData to store such informations. --- 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 f57d7fe..2a54111 100644 --- a/srcs/juloo.keyboard2/Keyboard2.java +++ b/srcs/juloo.keyboard2/Keyboard2.java @@ -296,10 +296,9 @@ public class Keyboard2 extends InputMethodService return; KeyboardData layout = getLayout(_config.programming_layout).mapKeys(new KeyboardData.MapKeyValues() { - public KeyValue apply(KeyValue key) + public KeyValue apply(KeyValue key, boolean localized) { - if (key != null - && key.getKind() == KeyValue.Kind.Event + if (key.getKind() == KeyValue.Kind.Event && key.getEvent() == KeyValue.Event.SWITCH_PROGRAMMING) return KeyValue.getKeyByName("switch_text"); return key; -- cgit v1.2.3