abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/ComposeKey.java
diff options
context:
space:
mode:
Diffstat (limited to 'srcs/juloo.keyboard2/ComposeKey.java')
-rw-r--r--srcs/juloo.keyboard2/ComposeKey.java21
1 files changed, 14 insertions, 7 deletions
diff --git a/srcs/juloo.keyboard2/ComposeKey.java b/srcs/juloo.keyboard2/ComposeKey.java
index 173fcd7..4a8cff7 100644
--- a/srcs/juloo.keyboard2/ComposeKey.java
+++ b/srcs/juloo.keyboard2/ComposeKey.java
@@ -10,15 +10,22 @@ public final class ComposeKey
{
switch (kv.getKind())
{
- case Char: return apply(state, kv.getChar());
+ case Char:
+ KeyValue res = apply(state, kv.getChar());
+ // Dim characters not part of any sequence instead of removing them.
+ if (res == null)
+ return kv.withFlags(kv.getFlags() | KeyValue.FLAG_SECONDARY);
+ return res;
/* These keys must not be removed. */
- case Event: return kv;
- case Modifier: return kv;
+ case Event:
+ case Modifier:
+ return kv;
/* These keys cannot be part of sequences. */
- case String: return null;
- case Keyevent: return null;
- case Editing: return null;
- case Placeholder: return null;
+ case String:
+ case Keyevent:
+ case Editing:
+ case Placeholder:
+ return kv.withFlags(kv.getFlags() | KeyValue.FLAG_SECONDARY);
case Compose_pending: return null;
}
return null;