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

Re: modifier key query


  • Subject: Re: modifier key query
  • From: Ricky Sharp <email@hidden>
  • Date: Wed, 31 Dec 2008 12:21:04 -0600


On Dec 31, 2008, at 11:36 AM, Sean McBride wrote:

Wesley Smith (email@hidden) on 2008-12-26 3:04 AM said:

Is there a way to know if a modifier key (shift, ctrl, option, cmd,
etc) is pressed?  Obviously, there's this:
NSUInteger modifierFlags = [theEvent modifierFlags];

but what if you need to know this information independent of an
NSEvent?  Anyway to get it?  So far I haven't seen anything
encouraging in the docs.

There's GetCurrentKeyModifiers(), which is superbly documented in
CarbonEventsCore.h. But sticking with NSEvent, if you can, if probably
better.


There's really nothing wrong with relying upon certain Carbon APIs. If or when Apple ever removes Carbon, I foresee APIs moving to new homes.

It's not like the current system has two shared libraries (Carbon/ Cocoa) and when Carbon goes, all APIs go with it. In many cases, Carbon APIs are just wrappers over lower-level code.

If there are key pieces of functionality that you can do in Carbon, but not Cocoa, definitely file enhancement requests to add those APIs to Cocoa.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com




_______________________________________________

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: modifier key query
      • From: "Sean McBride" <email@hidden>
References: 
 >modifier key query (From: "Wesley Smith" <email@hidden>)
 >Re: modifier key query (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: Storing NSDocument data in packages/bundles
  • Next by Date: Re: modifier key query
  • Previous by thread: Re: modifier key query
  • Next by thread: Re: modifier key query
  • Index(es):
    • Date
    • Thread