abouttreesummaryrefslogcommitdiff
path: root/srcs
diff options
context:
space:
mode:
authorJules Aguillon2024-02-22 19:10:31 +0100
committerJules Aguillon2024-02-22 19:10:31 +0100
commitb8e673b6142bc3061a20fdb2186c9470772417fd (patch)
tree0ebe9a23e163fdec16d1331300877bf60d1496f7 /srcs
parentbae82d6ed8daf732b2c92cca5635925aa4bf5202 (diff)
downloadunexpected-keyboard-b8e673b6142bc3061a20fdb2186c9470772417fd.tar.gz
unexpected-keyboard-b8e673b6142bc3061a20fdb2186c9470772417fd.zip
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..
Diffstat (limited to 'srcs')
-rw-r--r--srcs/juloo.keyboard2/Config.java3
1 files changed, 3 insertions, 0 deletions
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<KeyValue, KeyboardData.PreferredPos> extra_keys = new HashMap<KeyValue, KeyboardData.PreferredPos>();
final Set<KeyValue> remove_keys = new HashSet<KeyValue>();
+ // 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)