Forum

Click vs. Swipe


#1

hi, is there a simple solution to avoid the click when I swipe in the middle.

patch:

Click_Swipe.v4p (32.2 KB)

thanks in advance
jens


#2

Monoflop on up OR down for half a second or so. and use this boolean then as an inhibitor for your click with a simple AND


#3

that was also my first idea, but it does not work.
or is still something wrong.

Click_Swipe_MonoFlop.v4p (34.7 KB)


#4

Ok, another design pattern I am using is to apply logic as early as possible, for example before the hittest / button check. And make clicks on the down flank of the tog edge so there is time to detect actually the swipe. Also instead of monoflop i made a flipflop, which is not time dependent.

Click_Swipe_MonoFlop2.v4p (37.0 KB)


#5

I always sample the xy coordinates on press, then again on relase and check their distance. If they are over a certain threshold it’s a swype.


#6

Well as @schlonzo mentioned, do a tog edge on press then s+h, if distance from beginning of press is higher then certain amount then it’s slide… else on release it’s hit


#7

the down edge don`t sample, is somewhere a framedelay is necessary

Click_Swipe_MonoFlop_03.v4p (42.9 KB)