abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/KeyEventHandler.java
diff options
context:
space:
mode:
authorJules Aguillon2024-03-18 01:00:22 +0100
committerJules Aguillon2024-03-18 01:00:22 +0100
commite604f6fd57d85f46dd46da9da192646660547bc2 (patch)
tree23e27096cc85ec85d865ef7f13afb6f7422b8c2c /srcs/juloo.keyboard2/KeyEventHandler.java
parentdc3a303af1ef72602b58292e5cc938944d6954ba (diff)
downloadunexpected-keyboard-e604f6fd57d85f46dd46da9da192646660547bc2.tar.gz
unexpected-keyboard-e604f6fd57d85f46dd46da9da192646660547bc2.zip
refactor: Implement Compose without global state
Thanks to the previous commit, a modifier key can now be more complex than just a KeyValue.Modifier. This allows a more elegant implementation of the compose key, that could be taken as a base for other features (eg. unicode hex entry, hangul) The COMPOSE_PENDING modifier is removed as keys of kind Compose_pending can act as a modifier. This has the advantage of highlighting the key that was last pressed in the sequence. Rules are added to Pointers: Non-special but latchable keys must clear latches and cannot be locked with a long press. These rules were not needed before but were intended.
Diffstat (limited to 'srcs/juloo.keyboard2/KeyEventHandler.java')
-rw-r--r--srcs/juloo.keyboard2/KeyEventHandler.java4
1 files changed, 0 insertions, 4 deletions
diff --git a/srcs/juloo.keyboard2/KeyEventHandler.java b/srcs/juloo.keyboard2/KeyEventHandler.java
index a7f9ecb..01c4300 100644
--- a/srcs/juloo.keyboard2/KeyEventHandler.java
+++ b/srcs/juloo.keyboard2/KeyEventHandler.java
@@ -69,9 +69,6 @@ public final class KeyEventHandler implements Config.IKeyEventHandler
case META:
_autocap.stop();
break;
- case COMPOSE_PENDING:
- KeyModifier.set_compose_pending(0);
- break;
}
break;
default: break;
@@ -95,7 +92,6 @@ public final class KeyEventHandler implements Config.IKeyEventHandler
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;
}