diff options
| author | Jules Aguillon | 2025-02-23 18:00:44 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2025-02-23 18:00:44 +0100 |
| commit | ca25cc55f6bc2c7b3100da2f7bf18a078a23f55e (patch) | |
| tree | e3e94c2fa073e44063b66d86f8be4789620714ad /srcs/juloo.keyboard2/LayoutModifier.java | |
| parent | 68be82a4f92f47300b9960cf9cf65040c96f17ed (diff) | |
| download | unexpected-keyboard-ca25cc55f6bc2c7b3100da2f7bf18a078a23f55e.tar.gz unexpected-keyboard-ca25cc55f6bc2c7b3100da2f7bf18a078a23f55e.zip | |
Apply compose sequences to String keys
This is mostly useful for characters that do not fit on a single 16-bit
char.
Shift sequences for 𝕨𝕩𝕗𝕘𝕤 are added for illustration.
Diffstat (limited to 'srcs/juloo.keyboard2/LayoutModifier.java')
| -rw-r--r-- | srcs/juloo.keyboard2/LayoutModifier.java | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/srcs/juloo.keyboard2/LayoutModifier.java b/srcs/juloo.keyboard2/LayoutModifier.java index 830a50c..7be3fb6 100644 --- a/srcs/juloo.keyboard2/LayoutModifier.java +++ b/srcs/juloo.keyboard2/LayoutModifier.java @@ -138,15 +138,8 @@ public final class LayoutModifier return new KeyboardData.MapKeyValues() { public KeyValue apply(KeyValue key, boolean localized) { - switch (key.getKind()) - { - case Char: - KeyValue modified = ComposeKey.apply(map_digit, key.getChar()); - if (modified != null) - return modified; - break; - } - return key; + KeyValue modified = ComposeKey.apply(map_digit, key); + return (modified != null) ? modified : key; } }; } |
