• 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: iTunes-like behaviour of NSButton with NSAlternateKeyMask
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iTunes-like behaviour of NSButton with NSAlternateKeyMask


  • Subject: Re: iTunes-like behaviour of NSButton with NSAlternateKeyMask
  • From: "Michael G. Ströck" <email@hidden>
  • Date: Fri, 9 Feb 2007 21:03:27 +0100


Am 09.02.2007 um 20:41 schrieb Murat Konar:

iTunes and iPhoto keep monitoring the status of the Option key even when they're in the background, and I can't figure out how it's done. Can anybody here on the list give me any pointers?

Try this:

#import <Carbon/Carbon.h>

BOOL optionKeyIsDown()
{
	return (GetCurrentKeyModifiers() & optionKey) != 0;
}
_murat

Thanks murat, but detecting the option key is, I believe, not the problem, the problem is getting the button to change it's appearance and action while your application does NOT have focus. Where do I do that?


Just look at iCal for example. When you press shift, the leftmost button changes. Now, click outside of iCal, or even on a menu inside iCal -- the button is stuck in its alternate form.


Michael _______________________________________________

Cocoa-dev mailing list (email@hidden)

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: iTunes-like behaviour of NSButton with NSAlternateKeyMask
      • From: Murat Konar <email@hidden>
References: 
 >iTunes-like behaviour of NSButton with NSAlternateKeyMask (From: "Michael G. Ströck" <email@hidden>)
 >Re: iTunes-like behaviour of NSButton with NSAlternateKeyMask (From: Murat Konar <email@hidden>)

  • Prev by Date: Re: iTunes-like behaviour of NSButton with NSAlternateKeyMask
  • Next by Date: Re: Framework for printing reports?
  • Previous by thread: Re: iTunes-like behaviour of NSButton with NSAlternateKeyMask
  • Next by thread: Re: iTunes-like behaviour of NSButton with NSAlternateKeyMask
  • Index(es):
    • Date
    • Thread