• 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: Detecting option key with button click
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Detecting option key with button click


  • Subject: RE: Detecting option key with button click
  • From: Anthony Duer <email@hidden>
  • Date: Thu, 19 Sep 2002 23:10:58 -0700

I know this is probably in the archives or documentation somewhere (but I
can9t find it). Can someone point me to the documentation on how to detect
if a user had the option key pressed when a button was clicked. I9ve looked
at NSEvent, keyDown etc but I9m not sure how to get the correct event
associated with the button click. Many thanks...

John

-(void) mouseDown: (NSEvent *)event
{
unsigned int flags = [event modifierFlags];
if(flags & NSAlternateKeyMask)
{
....
}
}

Enjoy. :)

~Anthony Duer
Orion Project
_______________________________________________
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.

  • Prev by Date: Rock : Me : Hard Place
  • Next by Date: Re: PB pref to...?
  • Previous by thread: Detecting option key with button click
  • Next by thread: Encoding NSAttributedString in 10.2
  • Index(es):
    • Date
    • Thread