• 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
Unable to detect a NSRightMouseDown event using a three-button mouse?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unable to detect a NSRightMouseDown event using a three-button mouse?


  • Subject: Unable to detect a NSRightMouseDown event using a three-button mouse?
  • From: "Cloud Strife" <email@hidden>
  • Date: Sat, 26 Jul 2008 20:42:48 +0800

Hi everyone. Maybe this issue is very odd, but I came across it indeed.
I wrote an application using an override NSView to respond events trigged by
users. Obviously, rewrite the -(void)mouseDown:(NSEvent* )theEvent is
necessary.
I want to test what button of mouse the user presses. So I want to check the
output of the [NSEvent type] value. Surprisingly, the output value is always
1, that is NSLeftMouseDown. No matter what button I pressed, the left button
or the right button, using a three-button mouse, cocoa kept reporting I
pressed the left button.

I am using a mouse shipped with Mac Pro(one key only), and a mouse made by
Microsoft(three keys, I am using it for testing :-) ). It is understandable
cocoa can only detect the left key when using the one-key mouse. But it is a
little puzzled returning a left-button-down  event when press the right
button. Maybe cocoa is angry with Microsoft Mouse?


It is really strange... Can anyone here tell me what is wrong here? Any help
is highly appreciated.
Thank you very much. Have a nice day.

--
Best regards.
_______________________________________________

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

  • Follow-Ups:
    • Re: Unable to detect a NSRightMouseDown event using a three-button mouse?
      • From: Charles Srstka <email@hidden>
    • Re: Unable to detect a NSRightMouseDown event using a three-button mouse?
      • From: "Michael Ash" <email@hidden>
  • Prev by Date: Re: memory management
  • Next by Date: Re: (Newb question?) Launching app on dock icon file drop?
  • Previous by thread: Binding NSArrayController's objects to an NSTextView
  • Next by thread: Re: Unable to detect a NSRightMouseDown event using a three-button mouse?
  • Index(es):
    • Date
    • Thread