• 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: [newbie] Hot Key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [newbie] Hot Key


  • Subject: Re: [newbie] Hot Key
  • From: Ondra Cada <email@hidden>
  • Date: Tue, 2 Jul 2002 20:03:03 +0200

On Tuesday, July 2, 2002, at 07:16 , Lance Bland wrote:

but, if I understand your problem, it would probably be better to do this:

#import <Cocoa/Cocoa.h>

if([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask)
{
// do my option processing
}

This, triple alas, does not work if there is no current event (like when the app was just launched). That's one of the small number of real problems Cocoa does have.

2 Tom:

if you have a plain-C code which does work for you properly in a Carbon thing, it would work as well in Cocoa. The "optionKey" of yours does not look to me like a constant at all; though, since I don't know Carbon mysel,
I may be wrong.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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: [newbie] Hot Key
      • From: Finlay Dobbie <email@hidden>
References: 
 >Re: [newbie] Hot Key (From: Lance Bland <email@hidden>)

  • Prev by Date: Re: Cocoa stripping resource forks: does Jaguar fix?
  • Next by Date: Re: Installing a new login item?
  • Previous by thread: Re: [newbie] Hot Key
  • Next by thread: Re: [newbie] Hot Key
  • Index(es):
    • Date
    • Thread