From 0061911ef3a4c9339638571e2ddc5377adc25af1 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Tue, 4 Feb 2025 15:50:17 +0100 Subject: Pressing the compose key exits the pending sequence Allows stopping a compose sequence without typing anything. This is also a more intuitive behavior rather than starting a new sequence. --- srcs/juloo.keyboard2/ComposeKey.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'srcs/juloo.keyboard2/ComposeKey.java') diff --git a/srcs/juloo.keyboard2/ComposeKey.java b/srcs/juloo.keyboard2/ComposeKey.java index 9a4d399..6e0094d 100644 --- a/srcs/juloo.keyboard2/ComposeKey.java +++ b/srcs/juloo.keyboard2/ComposeKey.java @@ -15,10 +15,12 @@ public final class ComposeKey if (res == null) return kv.withFlags(kv.getFlags() | KeyValue.FLAG_GREYED); return res; + /* Tapping compose again exits the pending sequence. */ + case Compose_pending: + return KeyValue.nothingKey(kv); /* These keys are not greyed. */ case Event: case Modifier: - case Compose_pending: return kv; /* Other keys cannot be part of sequences. */ default: -- cgit v1.2.3