diff options
| author | Jules Aguillon | 2024-09-29 21:58:22 +0200 |
|---|---|---|
| committer | GitHub | 2024-09-29 21:58:22 +0200 |
| commit | 9f22e53a3ba8f064e69e3a84c371a7f29ee9e05c (patch) | |
| tree | 96735329102cdde5460818f22803e67dc42c6356 /srcs/juloo.keyboard2/Config.java | |
| parent | e309b76c0a8cb4c322b5fa902a080e19c2fe1f08 (diff) | |
| download | unexpected-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/Config.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Config.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java index 5e60815..6d77f6f 100644 --- a/srcs/juloo.keyboard2/Config.java +++ b/srcs/juloo.keyboard2/Config.java @@ -210,8 +210,7 @@ public final class Config KeyValue action_key() { // Update the name to avoid caching in KeyModifier - return (actionLabel == null) ? null : - KeyValue.getKeyByName("action").withSymbol(actionLabel); + return (actionLabel == null) ? null : KeyValue.makeActionKey(actionLabel); } /** Update the layout according to the configuration. |
