AltSnap icon indicating copy to clipboard operation
AltSnap copied to clipboard

Touchpad--three finger tap is not equal to Middle mouse button for AltSnap ?

Open KAGEYAM4 opened this issue 3 years ago • 17 comments
trafficstars

is there a way altsnap can register three tap as middle mouse button .. my every other application recognizes it as middle button press. image

KAGEYAM4 avatar Aug 02 '22 16:08 KAGEYAM4

I do not own any multi-touch device so I cannot develop anything like this. This may change in the future if I get new hardware.

I am not sure which panel you are showing, does the driver send a mouse input when you tap? Maybe it sends a message to the pointed window (that cannot be intercepted by AltSnap).

RamonUnch avatar Aug 02 '22 17:08 RamonUnch

I am not sure which panel you are showing, does the driver send a mouse input when you tap? Maybe it sends a message to the pointed window (that cannot be intercepted by AltSnap).

yes maybe this is what happening. these are gesture laptop touchpad .

KAGEYAM4 avatar Aug 02 '22 17:08 KAGEYAM4

I will see If i can make a quick diagnosis tool to better see what happens, maybe there is an easy fix.

RamonUnch avatar Aug 02 '22 17:08 RamonUnch

@RamonUnch ok. Thank you so much .. will be waiting to test it .

KAGEYAM4 avatar Aug 02 '22 17:08 KAGEYAM4

hooks_x64.zip

Ok, backup your current hooks.dll and replace it with this one. It will create a log (ad.log) that tells whenever AltSnap intercepts a mouse input different from left, right mouse buttons or wheel. So if you middle click you should see a line appear. (wParam=207 ... \n wParam=208 ...) then try our mouse gesture and see if anything appear in the log.

Form waht I read it seems not trivial to pick up those actions This was discussed on the ahk forums: https://www.autohotkey.com/boards/viewtopic.php?p=289237

RamonUnch avatar Aug 02 '22 19:08 RamonUnch

ok did some experimentation --- here are results.

Note -- My Mod key are Alt(Primary) and Ctrl(Alternate)

  1. No Mod key are pressed , only tried doing three tap action using touch pad (only once) . The result --
wParam=207, data=0, time=302451578, extra=0, LastError=0
wParam=208, data=0, time=302451578, extra=0, LastError=0
wParam=207, data=0, time=302451765, extra=ffc3d44d, LastError=0
wParam=208, data=0, time=302451859, extra=ffc3d44d, LastError=0

this results also appear if i press middle button using mouse (only once)--

wParam=207, data=0, time=302588359, extra=0, LastError=0
wParam=208, data=0, time=302588484, extra=0, LastError=0
wParam=207, data=0, time=302588515, extra=ffc3d44d, LastError=0
wParam=208, data=0, time=302588593, extra=ffc3d44d, LastError=0

2.) When i press Alt+Middle mouse click (Three times - one after another with a break of 200 ms or so)

wParam=207, data=0, time=303713750, extra=0, LastError=0
wParam=208, data=0, time=303713875, extra=0, LastError=2
wParam=207, data=0, time=303729781, extra=0, LastError=1401
wParam=208, data=0, time=303729921, extra=0, LastError=2
wParam=207, data=0, time=303733531, extra=0, LastError=1401
wParam=208, data=0, time=303733671, extra=0, LastError=2

3.) When i press Alt+TouchPadThreeTap Nothing get logged

if you need anymore scenarios , let me know

KAGEYAM4 avatar Aug 03 '22 04:08 KAGEYAM4

This is what I was suspecting there is no mouse input that is actually sent. So AltSnap's loop does not receive corresponding messages though the low level mouse proc.

There is still the potential to reconstruct multi-touch messages by checking for consecutive left mouse down messages, This might do the trick, I will give you a more logy version to see if there is the potential.

AnywayI could use the TouchInput api and for sure it is possible to handle it at a low level.

RamonUnch avatar Aug 03 '22 06:08 RamonUnch

Forget what I said, I did not see the first line of your comment. This is very strange that nothing gets logged when you press Alt. Does it also happens when you disable the primary cation for the left click?

RamonUnch avatar Aug 03 '22 06:08 RamonUnch

Does it also happens when you disable the primary cation for the left click?

Do you mean this , can you explain "disable the primary cation for the left click" image

KAGEYAM4 avatar Aug 03 '22 06:08 KAGEYAM4

yes, this is what I mean, the idea is that if altsnaps receaves alt+lclick then it starts a move action and ignores the MMB that comes after. This is the theory at least

RamonUnch avatar Aug 03 '22 09:08 RamonUnch

yes, this is what I mean, the idea is that if altsnaps receaves alt+lclick then it starts a move action and ignores the MMB that comes after. This is the theory at least

ok i did this ..

image image

but Alt+TouchPadThreeTap did not logged anything in ad.log

KAGEYAM4 avatar Aug 03 '22 09:08 KAGEYAM4

just to be sure . i am talking about touchpad three tap gesture .. here are some screenshots image image

KAGEYAM4 avatar Aug 03 '22 09:08 KAGEYAM4

wait i think i got something

KAGEYAM4 avatar Aug 03 '22 09:08 KAGEYAM4

ok this is happening : When i press Alt+TouchPadThreeTap nothing is getting logged. but then i tried Ctrl || Win || Shift + TouchPadThreeTap the ad.log is getting populated. Then i changed my Primary Altsnap key to Ctrl , but now Ctrl+Middle Click (Mouse) is working but still Ctrl+TouchPadThreeTap is action is not working ( but the ad.log is getting populated).

here are the ad.log events pressed Ctrl+TouchPadThreeTap ---> Three times

wParam=207, data=0, time=4569062, extra=0, LastError=0
wParam=208, data=0, time=4569062, extra=0, LastError=0
wParam=207, data=0, time=4569281, extra=ffc3d44d, LastError=0
wParam=208, data=0, time=4569390, extra=ffc3d44d, LastError=0
wParam=207, data=0, time=4570609, extra=0, LastError=0
wParam=208, data=0, time=4570609, extra=0, LastError=0
wParam=207, data=0, time=4570781, extra=ffc3d44d, LastError=0
wParam=208, data=0, time=4570812, extra=ffc3d44d, LastError=0
wParam=207, data=0, time=4572156, extra=0, LastError=0
wParam=208, data=0, time=4572156, extra=0, LastError=0
wParam=207, data=0, time=4572218, extra=ffc3d44d, LastError=0
wParam=208, data=0, time=4572265, extra=ffc3d44d, LastError=0

KAGEYAM4 avatar Aug 03 '22 09:08 KAGEYAM4

Quite strange indeed, Maybe windows treats the Alt key specially when it comes to touch gestures. plus it seems the MMB down/up events gets repeated two times for one Ctrl+TouchPadThreeTap.

RamonUnch avatar Aug 03 '22 10:08 RamonUnch

plus it seems the MMB down/up events gets repeated two times for one Ctrl+TouchPadThreeTap.

half right .. This is the behaviour--->

P.S Note -- All of these were only performed once

1.) When only middle button mouse click is done

wParam=207, data=0, time=8325859, extra=0, LastError=0
wParam=208, data=0, time=8326000, extra=0, LastError=0
wParam=207, data=0, time=8326062, extra=ffc3d44d, LastError=0
wParam=208, data=0, time=8326140, extra=ffc3d44d, LastError=0

2.) When only touchPadThreeTap gesture is used

wParam=207, data=0, time=8357140, extra=0, LastError=0
wParam=208, data=0, time=8357140, extra=0, LastError=0
wParam=207, data=0, time=8357234, extra=ffc3d44d, LastError=0
wParam=208, data=0, time=8357265, extra=ffc3d44d, LastError=0

3.) When Ctrl+MiddleMouseButton is pressed

wParam=207, data=0, time=8395281, extra=0, LastError=1401
wParam=208, data=0, time=8395390, extra=0, LastError=2

4.) When Ctrl+TouchPadThreeTap is pressed

wParam=207, data=0, time=8431234, extra=0, LastError=0
wParam=208, data=0, time=8431234, extra=0, LastError=0
wParam=207, data=0, time=8431437, extra=ffc3d44d, LastError=0
wParam=208, data=0, time=8431531, extra=ffc3d44d, LastError=0

also the behaviour is same for Win && Shift

5.) When Alt+TouchPadThreeTap is pressed Nothing is logged

KAGEYAM4 avatar Aug 03 '22 11:08 KAGEYAM4

All of these above were only performed once

KAGEYAM4 avatar Aug 03 '22 16:08 KAGEYAM4