mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2025-06-22 18:53:23 +02:00
Slightly less permissive swipe detection
This allows starting an anticircle gesture on a key with sliders on two opposite sides.
This commit is contained in:
parent
3e3fd6ffda
commit
188c68279d
@ -234,8 +234,9 @@ public final class Pointers implements Handler.Callback
|
||||
private KeyValue getNearestKeyAtDirection(Pointer ptr, int direction)
|
||||
{
|
||||
KeyValue k;
|
||||
// [i] is [0, -1, 1, -2, 2, ...]
|
||||
for (int i = 0; i > -4; i = (~i>>31) - i)
|
||||
// [i] is [0, -1, 1, -2, 2], scanning a 1/4 of the circle's area, centered
|
||||
// on the initial direction.
|
||||
for (int i = 0; i > -2; i = (~i>>31) - i)
|
||||
{
|
||||
int d = (direction + i + 16) % 16;
|
||||
// Don't make the difference between a key that doesn't exist and a key
|
||||
|
Loading…
x
Reference in New Issue
Block a user