abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/KeyboardData.java
diff options
context:
space:
mode:
Diffstat (limited to 'srcs/juloo.keyboard2/KeyboardData.java')
-rw-r--r--srcs/juloo.keyboard2/KeyboardData.java24
1 files changed, 4 insertions, 20 deletions
diff --git a/srcs/juloo.keyboard2/KeyboardData.java b/srcs/juloo.keyboard2/KeyboardData.java
index 6274eb0..adbf790 100644
--- a/srcs/juloo.keyboard2/KeyboardData.java
+++ b/srcs/juloo.keyboard2/KeyboardData.java
@@ -195,7 +195,10 @@ class KeyboardData
return new Key(key0, key1, key2, key3, key4, width * s, shift, edgekeys);
}
- private KeyValue getAtDirectionExact(int direction)
+ /*
+ * See Pointers.onTouchMove() for the represented direction.
+ */
+ public KeyValue getAtDirection(int direction)
{
if (edgekeys)
{
@@ -229,25 +232,6 @@ class KeyboardData
}
return null;
}
-
- /*
- * Get the KeyValue at the given direction. In case of swipe (!= 0), get the
- * nearest KeyValue that is not key0. See Pointers.onTouchMove() for the
- * represented direction.
- */
- public KeyValue getAtDirection(int direction)
- {
- if (direction == 0)
- return key0;
- KeyValue k;
- for (int i = 0; i > -2; i = (~i>>31) - i)
- {
- k = getAtDirectionExact(Math.floorMod(direction + i - 1, 8) + 1);
- if (k != null)
- return k;
- }
- return null;
- }
}
// Not using Function<KeyValue, KeyValue> to keep compatibility with Android 6.