From 8c290732607692cd94247f7e3e9c80fad1dfe516 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sun, 11 Feb 2024 20:46:36 +0100 Subject: Compose key The COMPOSE_PENDING modifier indicate whether a compose sequence is in progress. The new key of kind Compose_pending sets the current state of the sequence. The compose sequences are compiled into a state machine by a python script into a compact encoding. The state of the pending compose is determined by the index of a state. --- srcs/juloo.keyboard2/KeyEventHandler.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'srcs/juloo.keyboard2/KeyEventHandler.java') diff --git a/srcs/juloo.keyboard2/KeyEventHandler.java b/srcs/juloo.keyboard2/KeyEventHandler.java index 65de779..6cc7171 100644 --- a/srcs/juloo.keyboard2/KeyEventHandler.java +++ b/srcs/juloo.keyboard2/KeyEventHandler.java @@ -69,6 +69,9 @@ public final class KeyEventHandler implements Config.IKeyEventHandler case META: _autocap.stop(); break; + case COMPOSE_PENDING: + KeyModifier.set_compose_pending(0); + break; } break; default: break; @@ -91,6 +94,10 @@ public final class KeyEventHandler implements Config.IKeyEventHandler case Keyevent: send_key_down_up(key.getKeyevent()); break; case Modifier: break; case Editing: handle_editing_key(key.getEditing()); break; + case Compose_pending: + KeyModifier.set_compose_pending(key.getPendingCompose()); + _recv.set_compose_pending(true); + break; } update_meta_state(old_mods); } @@ -293,6 +300,7 @@ public final class KeyEventHandler implements Config.IKeyEventHandler { public void handle_event_key(KeyValue.Event ev); public void set_shift_state(boolean state, boolean lock); + public void set_compose_pending(boolean pending); public InputConnection getCurrentInputConnection(); } -- cgit v1.2.3