ThreeFingersDragOnWindows
ThreeFingersDragOnWindows copied to clipboard
Jumpy behaviour - Surface Laptop 5
Hi,
The app detects the trackpad successfully on the Surface Laptop 5, but moves extremely jerkily/jumpily.
All three-finger gestures are disabled in windows settings. When three-finger gestures are enabled in Windows, they perform smoothly so believe trackpad is functioning correctly.
I am not sure what is expected in the Inputs
info screen, but the number of ID:
values varies rapidly (see attached screen recording).
In the attached screen recording I am smoothly moving in a large anti-clockwise circle.
Win10 10.0.19045 Latest app release v2.0.1 x64
https://github.com/ClementGre/ThreeFingersDragOnWindows/assets/47641774/0d524dba-9c76-4e33-8913-6a56d5e51850
Hi, There is a good chance that the jumpy behavior is due to the number of inputs that changes, as it should normally not. Actually, some touchpads are sending fingers coordinates one by one while others send contacts all together. I changed the code a little bit to try to fix this bug in case you have a touchpad that sends batch inputs. I will add some logging on the app and release a new version so we will be able to debug the thing in the case it is not fixed by the change I made.
Hi, I published a new release that allows to record the app logs and to save the log file from the Other settings pane. Can you update TFDOW and enable the logging. Then, reproduce the jumpy issue your are encountering, stop the logging, and upload the file here please.
Download the v2.0.2 here or on the Microsoft Store.
Logs_ThreeFingerDragOnWindows.txt
Adding log per https://github.com/ClementGre/ThreeFingerDragOnWindows/issues/13#issuecomment-2018720686
I noticed that you dragged with two fingers after some time, and the bug occured when adding back the third finger. Is that really what you did and observed?
On this image (the vertical axis is the time), green corresponds to having three fingers on the touchpad, and blue to two fingers :
I can’t tell if this is due to your touchpad or due to the way the library I use count contacts. As you see, the drag ends with a two fingers drag that might give a reason for #13.
The reason for the jumpy behavior is that when "you" are adding or removing a finger, the coordinates of one of the two other fingers changes very quickly, and can even sometimes alternate between two values. Like here with the y coordinate of the contact of ID: 0 (and x too):
[14:29:21.621] Receiving contacts: ID: 0 x,y: 372,279, ID: 1 x,y: 459,63, ID: 2 x,y: 367,355
[14:29:21.621] MOVING, (x, y) = (-7, 77)
[14:29:21.629] Receiving contacts: ID: 0 x,y: 379,202, ID: 1 x,y: 459,63, ID: 2 x,y: 367,355
[14:29:21.629] MOVING, (x, y) = (7, -77)
[14:29:21.635] Receiving contacts: ID: 0 x,y: 372,279, ID: 1 x,y: 460,63, ID: 2 x,y: 367,355
[14:29:21.635] MOVING, (x, y) = (-7, 77)
[14:29:21.643] Receiving contacts: ID: 0 x,y: 381,203, ID: 1 x,y: 460,63, ID: 2 x,y: 368,355
[14:29:21.643] MOVING, (x, y) = (9, -76)
[14:29:21.650] Receiving contacts: ID: 0 x,y: 374,279, ID: 1 x,y: 460,63, ID: 2 x,y: 368,355
[14:29:21.650] MOVING, (x, y) = (-7, 76)
etc.
Like #44, the bug is most likely due to the library emoacht/RawInput.Touchpad that I am using to parse the touchpad contacts from the RawInput API (see https://github.com/emoacht/RawInput.Touchpad/issues/1). I might not be able to fix this issue without editing this piece of code.
I tried to only drag with 3 fingers, but I'm not 100% certain where the log started and stopped. I certainly didn't go back and forth between 3 finger dragging, 2 finger dragging, 3 finger dragging, 2 finger dragging, though.
Here's one more log, just to be sure. I watched the system clock to ensure that it only includes a 3-finger drag, and nothign else. I removed the bit of the log before and after the actual 3 finger drag. This was a single "place down 3 fingers, drag, release 3 fingers" and nothing else:
Well, there is the same issue.
(On the screenshot, horizontal axis is time, three fingers in blue, the rest is to two fingers)
The fact that sometimes only two fingers are detected should not cause any issue, the drag continues as normally, and you can try to remove one finger after having started the drag process (it might change the logs, I'm interested in seing the result of dragging with only two fingers after having started the drag process with three fingers).
But the real issue is that oscillating gestures are reported, leading to a cursor that moves before getting to its original location. I can't find any pattern for when does this happens:
[14:41:02.274] Receiving contacts: ID: 0 x,y: 539,94, ID: 1 x,y: 480,236, ID: 2 x,y: 496,383
[14:41:02.274] MOVING, (x, y) = (-3, -72)
[14:41:02.280] Receiving contacts: ID: 0 x,y: 540,94, ID: 1 x,y: 486,308, ID: 2 x,y: 496,383
[14:41:02.280] MOVING, (x, y) = (6, 72)
[14:41:02.288] Receiving contacts: ID: 0 x,y: 540,94, ID: 1 x,y: 483,236, ID: 2 x,y: 499,383
[14:41:02.288] MOVING, (x, y) = (-3, -72)
[14:41:02.294] Receiving contacts: ID: 0 x,y: 543,94, ID: 1 x,y: 489,309, ID: 2 x,y: 499,383
[14:41:02.294] MOVING, (x, y) = (6, 73)
It sometimes repeats more than once, and sometimes repeats only once. A fix for this would be to move the cursor based on a average value over two inputs or more, which will make a latency of over 20ms instead of 10ms. I will add a feature for this in future release, but it would still be more efficient to fix the root of the issue on the emoacht/RawInput.Touchpad code.
Here's starting a 3 finger drag, then releasing 1 of the fingers and continuing to drag with 2 fingers
Here, there is not any more a wrong count of fingers on the touchpad.
(two fingers in green, three in blue)
I'll add the support for moving the mouse based on the average of multiple inputs in future releases, plus trying to see if there is a bug in emoacht/RawInput.Touchpad.
Hi, I added a way to move the cursor based on an average of N inputs. Can you upgrade to v2.0.4 and try to set the average to 2 inputs or more, it might help to reduce the jumpy behavior.
Hi, perhaps this made a marginal improvement - Please see attached screen recording again; smooth anti-clockwise circles maintaining 3 fingers on the trackpad; with associated log file.
https://github.com/ClementGre/ThreeFingerDragOnWindows/assets/47641774/3ac506fd-84fc-46d2-9329-0ab6aa6b9b66
I tried raising it as high as 7. It's still pretty much chaos for me. Here's an example:
Just a shot in the dark, can you try to disable the mouse acceleration and see if it is still jumpy?
Still jumpy.
Also fwiw, in my specific case there isn't a ton of benefit to debugging/fixing the dragging as it still has the right-click-on-release issue too, which means that even in the cases where it does drag smoothly, when I release the mouse, it doesn't actually lead to a drag - because of the right click. So for my purposes, that issue is even more of a blocker.
I just released a new version of TFDOW that should fix some bugs regarding the touchpad raw input parsing for touchpads that send reports "sequentially" (editing the code of emoacht/RawInput.Touchpad that I am using). It might fix your issue.
Can you try again on the v2.0.5 (Microsoft Store). If you still have issues, you can share again the log file.
No improvement to either jumping-around behavior, or right click on release behavior