• 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: current mouse buttons state
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: current mouse buttons state


  • Subject: Re: current mouse buttons state
  • From: Charles Crowley <email@hidden>
  • Date: Wed, 12 Nov 2003 22:42:44 -0700

Anybody know how to determine the current mouse buttons state ? I need to determine at some random interval wether the left mouse button is down or up.
(I know [NSEvent mouseLocation] will give the current mouse location)

It is a deprecated function but
(BOOL) Button()
returns the state of the left (or, strangely enough, the middle) mouse button.

It is a Carbon function so you must include the Carbon framework in Frameworks.Linked Frameworks (where Cocoa.framework is).

--Charlie Crowley
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: current mouse buttons state
      • From: Eric Schlegel <email@hidden>
References: 
 >current mouse buttons state (From: Rolf <email@hidden>)

  • Prev by Date: Re: Cocoa daemon
  • Next by Date: Re: Auto Generating HTML and PDF Documentation?
  • Previous by thread: current mouse buttons state
  • Next by thread: Re: current mouse buttons state
  • Index(es):
    • Date
    • Thread