• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: About the Primary Button problems in Cocoa Mouse Event Handling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >About the Primary Button problems in Cocoa Mouse Event Handling (From: "Celery01 Lin" <email@hidden>)

  • Prev by Date: Re: DataSource for NSTableView with ButtonCell
  • Next by Date: duplicate symbol error
  • Previous by thread: About the Primary Button problems in Cocoa Mouse Event Handling
  • Next by thread: Auto-resizing column based on the data inside it?
  • Index(es):
    • Date
    • Thread