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

Notifying when a key is pressed and perform default tasks.


  • Subject: Notifying when a key is pressed and perform default tasks.
  • From: Ricardo Diaz <email@hidden>
  • Date: Mon, 20 Aug 2007 23:40:48 +0000
  • Importance: Normal

How can a subclass of NSTextView notify when a key is pressed AND do the thing it's supposed to do? (insert the glyph, space, tab, move the insertion point)
Because I tried putting:

- (void)keyDown:(NSEvent *)theEvent
{
    NSLog("Key pressed");
}

And it did post "Key pressed" but didn't insert the glyph. I wrote this in TextViewSubclass.m

Thanks in advanced.
_________________________________________________________________
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: Andrew Farmer <email@hidden>
  • Prev by Date: Re: BOOL problem
  • Next by Date: Re: Notifying when a key is pressed and perform default tasks.‎
  • Previous by thread: Re: How to get a DOMRange
  • Next by thread: Re: Notifying when a key is pressed and perform default tasks.
  • Index(es):
    • Date
    • Thread