Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pixel scroll #95

Closed
yukulele opened this issue Jan 10, 2014 · 4 comments
Closed

pixel scroll #95

yukulele opened this issue Jan 10, 2014 · 4 comments
Labels

Comments

@yukulele
Copy link

I would like to know if a mouse event is generated from classic wheel device (logitech/microsoft mouse) or a pixel scroll device (Apple magic mouse/trackpad)

How to reliably differentiate them ?

$('#my_elem').on('mousewheel', function(event) {
    console.log(event.fromPixelScroll); //boolean
});
@brandonaaron
Copy link
Contributor

Good question. I'm not sure we can reliably differentiate them but I'll dig into this a little bit in the near future. In the mean time my initial gut feeling is that we may have to just investigate the event.deltaFactor... If the deltaFactor is 1, then it is a pixel scroll device. More than likely this simple approach won't work for all the browser/os/device combinations.

@pavelthq
Copy link

any news about this?

@brandonaaron
Copy link
Contributor

None so far. Haven't had a chance to test out what I mentioned earlier.—
Brandon Aaron

On Thu, Sep 11, 2014 at 7:39 AM, Pavel notifications@github.com wrote:

any news about this?

Reply to this email directly or view it on GitHub:
#95 (comment)

@dmethvin
Copy link
Member

@yukulele So the feature being requested here is to detect the difference between devices on the same computer? Can you do some legwork to provide data about the events generated by each and the properties in the event objects? If they differ it may be possible to distinguish them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants