Re: About the Primary Button problems in Cocoa Mouse Event Handling
Re: About the Primary Button problems in Cocoa Mouse Event Handling
- Subject: Re: About the Primary Button problems in Cocoa Mouse Event Handling
- From: Ron Fleckner <email@hidden>
- Date: Thu, 3 Apr 2008 13:51:29 +1100
On 03/04/2008, at 11:45 AM, Celery01 Lin wrote:
HI , all!
I have a question about how can we detect the primary button .
Cocoa Mouse Event handling gives us NSEvent . Though type of the
NSEvent ,we can know which mouse button is down, up or dragged ,and
then We can do something according to Leftmouse down or rightmouse
down . But if the user change the primary mouse button in the User
Preference . Dose that mean all our logic is reversed?
or Dose cocoa assume that Leftmouse is primary mouse and bind the
Leftmouse to primary mouse?
How can we determine which mouse button is primary mouse button in
Cocoa?
I don't know, but one way to find out would be to change your mouse's
primary and secondary buttons around in System Prefs, then see how
that effects your code. That is, try it and see. I suspect that the
NSLeftMouse... constants would map to whatever the user has set as
the primary button. Let us know what you find.
Ron
_______________________________________________
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