From 121a2ba76f8c24e7545cc04fd915c43ad372970c Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sun, 8 May 2022 16:56:34 +0200 Subject: Find closest key further The previous limit was checking d-1 and d+1, the new limit also tries d-2 and d+2. --- srcs/juloo.keyboard2/Pointers.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3