Re: Reversed Mouse Wheel in Lion
Re: Reversed Mouse Wheel in Lion
- Subject: Re: Reversed Mouse Wheel in Lion
- From: Ken Thomases <email@hidden>
- Date: Sun, 18 Dec 2011 02:33:29 -0600
On Dec 18, 2011, at 2:25 AM, Dany Golubitsky wrote:
> As you know, there is an option in Lion to reverse mouse wheel in Lion to be more like TrackPad. Is there any way to know from the application the state of this option? Is there any system call for that?
From the AppKit release notes <https://developer.apple.com/library/mac/#releasenotes/Cocoa/AppKit.html>:
> Scroll and Gesture Direction (New since early 2011 seed)
>
> There is a new user preference to "Move content in the direction of finger movement." To accomplish this, deltaX/Y and scrollingDeltaX/Y are automatically inverted for NSEventScrollWheel events according to the user's preferences. The direction of swipes match the direction of scrolling and, as such, swipe deltas are inverted. However, for some uses of NSEventScrollWheel and NSEventTypeSwipe events, the behavior should not respect the user preference. This method allows you to determine when the event has been inverted and compensate by multiplying -1 if needed.
>
> - (BOOL)isDirectionInvertedFromDevice;
Cheers,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden