abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/KeyEventHandler.java
diff options
context:
space:
mode:
authorJules Aguillon2024-02-11 20:46:36 +0100
committerJules Aguillon2024-02-17 23:28:31 +0100
commit8c290732607692cd94247f7e3e9c80fad1dfe516 (patch)
tree1903ef13cc72626d0b12c712f9d15aede6fc67b4 /srcs/juloo.keyboard2/KeyEventHandler.java
parent38deb810f94d0e2fea91add4cd53fdd615d19d64 (diff)
downloadunexpected-keyboard-8c290732607692cd94247f7e3e9c80fad1dfe516.tar.gz
unexpected-keyboard-8c290732607692cd94247f7e3e9c80fad1dfe516.zip
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.
Diffstat (limited to 'srcs/juloo.keyboard2/KeyEventHandler.java')
-rw-r--r--srcs/juloo.keyboard2/KeyEventHandler.java8
1 files changed, 8 insertions, 0 deletions
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();
}