• 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: Control key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Control key


  • Subject: Re: Control key
  • From: Gerard Iglesias <email@hidden>
  • Date: Sun, 1 Jul 2001 23:32:27 +0200

The Cocoa way to do that is to get the current event, because your menu
action come from an event that is accessible from the NSApp object or
the window:

NSEvent * last = [NSApp currentEvent];
if ([last modifierFlags] & NSAlternateKeyMask)
return self;
else
return [super hitTest:aPoint];

Voila...

Girard


References: 
 >Re: Control key (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: Documentation Wish - was Re: AppKit source available as reference?
  • Next by Date: Re: QuickTime callbacks
  • Previous by thread: Re: Control key
  • Next by thread: Re: Control key
  • Index(es):
    • Date
    • Thread