diff options
| author | Jules Aguillon | 2022-05-08 16:56:34 +0200 |
|---|---|---|
| committer | Jules Aguillon | 2022-05-08 16:56:34 +0200 |
| commit | 121a2ba76f8c24e7545cc04fd915c43ad372970c (patch) | |
| tree | 7bae1d0d203f732ccfe7e0dc875c4bba94e22388 /srcs | |
| parent | 82d3290c6a12caa1cc4f3a5929e5466074c4e3ba (diff) | |
| download | unexpected-keyboard-121a2ba76f8c24e7545cc04fd915c43ad372970c.tar.gz unexpected-keyboard-121a2ba76f8c24e7545cc04fd915c43ad372970c.zip | |
Find closest key further
The previous limit was checking d-1 and d+1, the new limit also tries
d-2 and d+2.
Diffstat (limited to 'srcs')
| -rw-r--r-- | srcs/juloo.keyboard2/Pointers.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/srcs/juloo.keyboard2/Pointers.java b/srcs/juloo.keyboard2/Pointers.java index 866c36a..1011271 100644 --- a/srcs/juloo.keyboard2/Pointers.java +++ b/srcs/juloo.keyboard2/Pointers.java @@ -155,7 +155,7 @@ public final class Pointers implements Handler.Callback if (direction == 0) return _handler.modifyKey(ptr.key.key0, ptr.modifier_flags); KeyValue k; - for (int i = 0; i > -2; i = (~i>>31) - i) + for (int i = 0; i > -3; i = (~i>>31) - i) { int d = Math.floorMod(direction + i - 1, 8) + 1; // Don't make the difference between a key that doesn't exist and a key |
