简体   繁体   中英

How to detect the direction of mouse wheel scrolling?

I'm looking for a way to detect mouse wheel scrolling inside my application. I tried using Listener and its PointerScrollEvent , however, I don't see a way to detect the direction of the scroll, only my pointers position and such.

It would be best if I could get an integer as to, how many 'clicks' have the user scrolled.

Is there a clean method of detecting mouse wheel scrolling AND its direction?

Many thanks

pointerSignal.scrollDelta is the property, I'm so dumb

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM