Re: Notifying when a key is pressed and perform default tasks.
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