On a Macbook Pro in Chrome, sliding two fingers across the screen allows you to move backwards and forwards. How do I go about disabling this, and creating custom gestures in jQuery or Javascript?
All I really need to know is how do you detect when two fingers are on the trackpad, which I assume is the best way to do this. You can do it on mobile with e.touches!
Update May 2017
ctrlKey === true
.Original Answer
As of April 2016, the pinch-zoom gesture is supported in (very) different ways in different browsers:
mousewheel
-events with ev.ctrlKey===true
Touchpads do not trigger touch-related events (but usually control the mouse pointer instead. This cannot be affected by a website for obvious reasons) so that's not possible.
If gestures done on a touchpad have non-standard behaviour this is usually done by the touchpad's driver/software.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With