abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/prefs/CustomExtraKeysPreference.java
diff options
context:
space:
mode:
authorJules Aguillon2024-09-29 21:58:22 +0200
committerGitHub2024-09-29 21:58:22 +0200
commit9f22e53a3ba8f064e69e3a84c371a7f29ee9e05c (patch)
tree96735329102cdde5460818f22803e67dc42c6356 /srcs/juloo.keyboard2/prefs/CustomExtraKeysPreference.java
parente309b76c0a8cb4c322b5fa902a080e19c2fe1f08 (diff)
downloadunexpected-keyboard-9f22e53a3ba8f064e69e3a84c371a7f29ee9e05c.tar.gz
unexpected-keyboard-9f22e53a3ba8f064e69e3a84c371a7f29ee9e05c.zip
Add complex keys (#774)
This allows to add new kinds of keys that need more data without making KeyValue's footprint bigger for common keys. This changes the [_symbol] field into [_payload], which holds the same as the previous field for more common keys but can hold bigger objects for keys of the new "Complex" kind. This also adds a complex key: String keys with a symbol different than the outputted string. Unit tests are added as the Java language is not helpful in making robust code.
Diffstat (limited to 'srcs/juloo.keyboard2/prefs/CustomExtraKeysPreference.java')
-rw-r--r--srcs/juloo.keyboard2/prefs/CustomExtraKeysPreference.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/srcs/juloo.keyboard2/prefs/CustomExtraKeysPreference.java b/srcs/juloo.keyboard2/prefs/CustomExtraKeysPreference.java
index cf47d46..fda07ec 100644
--- a/srcs/juloo.keyboard2/prefs/CustomExtraKeysPreference.java
+++ b/srcs/juloo.keyboard2/prefs/CustomExtraKeysPreference.java
@@ -40,7 +40,7 @@ public class CustomExtraKeysPreference extends ListGroupPreference<String>
if (key_names != null)
{
for (String key_name : key_names)
- kvs.put(KeyValue.makeStringKey(key_name), KeyboardData.PreferredPos.DEFAULT);
+ kvs.put(KeyValue.parseKeyDefinition(key_name), KeyboardData.PreferredPos.DEFAULT);
}
return kvs;
}