• 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: Detect modifier keys on launch
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detect modifier keys on launch


  • Subject: Re: Detect modifier keys on launch
  • From: "Sean McBride" <email@hidden>
  • Date: Wed, 5 Jul 2006 17:21:57 -0400
  • Organization: Rogue Research

On 2006-07-05 16:54, Doug Knowles said:

>last time it quit.  I'd like to add the capability to temporarily
>suppress this behavior by holding down the shift key during launch.
>I've tried looking at the most recent event object, but since the app
>just launched, there is no such event.

When are you checking and how?  I believe calling NSApplication's
currentEvent at applicationWillFinishLaunching or
applicationDidFinishLaunching time should work.

>I have read that I should try using the Carbon APIs, but I'm getting
>lost in the need to provide a GrafPtr (boy, does that take me back),
>and it seems like it should be easier than that, or that there should
>be a sample code snippet around, since I doubt that this is an
>uncommon need.

You must be looking at an old API.  You can use
GetCurrentEventKeyModifiers() or GetCurrentKeyModifiers(), though the
former is preferable.  See the comments in the headers.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Detect modifier keys on launch
      • From: "Doug Knowles" <email@hidden>
References: 
 >Detect modifier keys on launch (From: "Doug Knowles" <email@hidden>)

  • Prev by Date: Re: Detect modifier keys on launch
  • Next by Date: Re: Resizing problems with generated core data entity window
  • Previous by thread: Re: Detect modifier keys on launch
  • Next by thread: Re: Detect modifier keys on launch
  • Index(es):
    • Date
    • Thread