diff options
| author | Jules Aguillon | 2024-01-26 00:17:51 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2024-01-26 00:17:51 +0100 |
| commit | c5f2c0b727c0ef70a76e897402e0247f148553fc (patch) | |
| tree | 80cbfd0435cbf29270485dee02fbebc85ec862e0 /srcs/juloo.keyboard2/Config.java | |
| parent | fb27f8d36f09e51e1988fb335e3fd9f34acb434e (diff) | |
| download | unexpected-keyboard-c5f2c0b727c0ef70a76e897402e0247f148553fc.tar.gz unexpected-keyboard-c5f2c0b727c0ef70a76e897402e0247f148553fc.zip | |
Send down event for modifiers on time
This allows to use modifiers in combination with other inputs like a
mouse click, for example under termux-x11.
The key down event and notification about modifiers changing are sent
down to KeyEventHandler. A mutable state remember for which modifier
down events have been sent.
When pressing down a modifier with one finger and typing with the
other, it might appear that the modifier is released after the first
time an other key is pressed and then pressed and released for the
following keys.
This prevents unintentionally type two modified keys instead of one
when the second key is pressed while the other is not yet released.
Diffstat (limited to 'srcs/juloo.keyboard2/Config.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Config.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java index e2fc316..b24210e 100644 --- a/srcs/juloo.keyboard2/Config.java +++ b/srcs/juloo.keyboard2/Config.java @@ -400,7 +400,8 @@ public final class Config public static interface IKeyEventHandler { public void key_down(KeyValue value, boolean is_swipe); - public void key_up(KeyValue value, Pointers.Modifiers flags); + public void key_up(KeyValue value, Pointers.Modifiers mods); + public void mods_changed(Pointers.Modifiers mods); } /** Config migrations. */ |
