From b8e673b6142bc3061a20fdb2186c9470772417fd Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Thu, 22 Feb 2024 19:10:31 +0100 Subject: [PATCH] Ensure the layout contain the config key Without the config key, the user risk being locked in a custom layout that lacks an escape key like 'switch_numpad', 'change_method', etc.. --- srcs/juloo.keyboard2/Config.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java index e4dbe2b..43f9712 100644 --- a/srcs/juloo.keyboard2/Config.java +++ b/srcs/juloo.keyboard2/Config.java @@ -209,6 +209,9 @@ public final class Config // first iteration then automatically added. final Map extra_keys = new HashMap(); final Set remove_keys = new HashSet(); + // Make sure the config key is accessible to avoid being locked in a custom + // layout. + extra_keys.put(KeyValue.getKeyByName("config"), KeyboardData.PreferredPos.ANYWHERE); extra_keys.putAll(extra_keys_param); extra_keys.putAll(extra_keys_custom); if (extra_keys_subtype != null)