• 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: Getting keyDown for option key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting keyDown for option key


  • Subject: Re: Getting keyDown for option key
  • From: Jeremy Dronfield <email@hidden>
  • Date: Tue, 20 Apr 2004 21:00:56 +0100

Make your window a sublclass, and implement -flagsChanged:, which gets called whenever modifier keys are pressed:

- (void)flagsChanged:(NSEvent *)theEvent
{
if ([theEvent modifierFlags] & NSAlternateKeyMask) { //mask for option key
//do your stuff
}
}

Hope this helps.

Regards
-Jeremy

===================================
SkoobySoft, home of viJournal
email: email@hidden or visit:
http://freespace.virgin.net/jeremy.dronfield/skoobysoft.html
===================================

On 20 Apr 2004, at 7:42 pm, Darrin Cardani wrote:

I would like to change the cursor when it's over a particular window and the user presses the option key. I have a -keyDown: method in the window controller, but it doesn't get called when the user only presses the option key. What do I need to do to get that key down event?

Thanks,
Darrin
--
Darrin Cardani - email@hidden
President, Buena Software, Inc.
<http://www.buena.com/>
Video, Image and Audio Processing Development
_______________________________________________
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.
_______________________________________________
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.


References: 
 >Getting keyDown for option key (From: Darrin Cardani <email@hidden>)

  • Prev by Date: Re: Receiving modifer-clicks on open menus
  • Next by Date: Re: Getting keyDown for option key
  • Previous by thread: Re: Getting keyDown for option key
  • Next by thread: Re: Getting keyDown for option key
  • Index(es):
    • Date
    • Thread