• 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: Christopher Lloyd <email@hidden>
  • Date: Sun, 01 Jul 2001 19:42:00 -0400

At 11:25 AM 7/1/2001 +0200, you wrote:
How do I detect if the control key is pressed at any point in my code, without having access to an NSEvent? I want to do this in a method called by a menu item...Do I have to resort to carbon?

[NSApp currentEvent] will return the most recent event, you can check the keyboard flags there. I think this is the most relevant way to do what you want.

Hope this helps,
Chris


References: 
 >Control key (From: David Remahl <email@hidden>)

  • Prev by Date: Re: Documentation Wish - was Re: AppKit source available as reference?
  • Next by Date: Re: Working with serial ports
  • Previous by thread: Re: Control key
  • Next by thread: Once upon a time, Yellow Box was platform independent...
  • Index(es):
    • Date
    • Thread