• 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: Notifying when a key is pressed and perform default tasks.‎‎
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Notifying when a key is pressed and perform default tasks.‎‎


  • Subject: Re: Notifying when a key is pressed and perform default tasks.‎‎
  • From: Ricardo Diaz <email@hidden>
  • Date: Tue, 21 Aug 2007 01:21:17 +0000
  • Importance: Normal

>> No, how can I do that? Someone had said that to me before but I couldn't do it.
>
>Need more information... notify what? who is getting the key event?
>what is do you mean by "perform default tasks"? etc.
>
>-Shawn

...Don't worry I already did it. You don't really need to know neither what I'm notifying nor who is getting the event. I already explained what the default tasks are in the first mail. Inserting a glyph for the letter keys, moving the insertion point for the arrow keys, etc.

Anyway I got it to work like this:

- (void)keyDown:(NSEvent *)theEvent
{
	[super keyDown:theEvent];
	[[NSNotificationCenter defaultCenter] postNotificationName:@"KeyPressed" object:self];
}

Thanks
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
_______________________________________________

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: Notifying when a key is pressed and perform default tasks.‎‎
      • From: "I. Savant" <email@hidden>
  • Prev by Date: [Job Posting] Blizzard job opening
  • Next by Date: Re: Notifying when a key is pressed and perform default tasks.‎
  • Previous by thread: [Job Posting] Blizzard job opening
  • Next by thread: Re: Notifying when a key is pressed and perform default tasks.‎‎
  • Index(es):
    • Date
    • Thread