-
Notifications
You must be signed in to change notification settings - Fork 580
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
Watch scroll wheel events? #938
Comments
|
@heptal Is there any example on how to watch scroll events? |
z = hs.eventtap.new({hs.eventtap.event.types.scrollWheel}, function(e)
print(e:getProperty(hs.eventtap.event.properties.scrollWheelEventDeltaAxis1),
e:getProperty(hs.eventtap.event.properties.scrollWheelEventDeltaAxis2))
end):start() There are other properties that might apply as well... check |
(I'm going to close this out because I don't think there is any work to be done in Hammerspoon. Please re-open if you disagree!) |
I'm interested in tracking a single mouse wheel scroll event (imagine a clicky mousewheel, not a Mac trackpad). And I'd like to distinguish the direction of the scroll (up or down). However I couldn't find a way yet. @asmagill's example will always print |
If the hardware or driver for the mouse is converting the scroll wheel actions into something else (arrow keys, pageUp/pageDown, etc.) then it may not be possible for us to get at these events since they've been changed into something else. Off the top of my head, if none of the scrollWheel events or properties are providing any data, then my suspicion is that we may not be able to do anything about it. What is the make and model of the mouse? A quick google search may show if people have found a way around this for your specific model... or at the very least allow us to start a list of known problematic hardware. |
Thanks for your reply! I tested two mice, both results the same:
I noticed that if I scroll many times quickly, then the numbers will begin to change to something like
So I can detect when lots of quick scrolling is happening, but not individual events. |
If anyone is interested to use the Trackball of the M570 as a vertical/horizontal Scrollwheel in Hammerspoon: pqrs-org/Karabiner-archived#814 |
I'm interested in creating some scroll wheel based mappings in order to enable horizontal scroll in my terminal emulator.
I was wondering if it's possible to create a watch for ScrollWheel events using hammerspoon.
I so far haven't found anything like this. Thanks in advance.
The text was updated successfully, but these errors were encountered: