Detect touchpad vs mouse in Javascript
The answer above by Lauri seems to work, but it took me a while to understand why it works. So here I’ll provide a slightly more human readable version, along with a conceptual explanation. First, that same code written out in a human readable manner: function detectTrackPad(e) { var isTrackpad = false; if (e.wheelDeltaY) { … Read more