• 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
keyDown event processing -- harder than it looks?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

keyDown event processing -- harder than it looks?


  • Subject: keyDown event processing -- harder than it looks?
  • From: Michael Crawford <email@hidden>
  • Date: Tue, 11 Jan 2011 14:17:44 -0500

I'm trying to process a simple keyDown event by overriding -keyDown on the NSWindowController derived class for my main window.

I've overridden the appropriate methods but I'm getting strange console message:

Type selection took over 1.000 seconds. Stopping early....

These are my overrides.

- (BOOL)acceptsFirstResponder
{
    return YES;
}

- (void)keyDown:(NSEvent*)event
{
    if ( kVK_Space == event.keyCode )
    {
        [controller tap:self];
    }
    else
    {
        [super keyDown:event];
    }
}

I have to admit, it has been a long time since I was interested in Mac keyboard events and for the past two years, I've been working mainly in iPhoneOS (iOS).

What do I need to do to successfully trigger behavior off of repeated taps on the space bar?

Thanks.
_______________________________________________

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: keyDown event processing -- harder than it looks?
      • From: Seth Willits <email@hidden>
  • Prev by Date: Re: Base SDK 10.6 deployment target 10.5 - symbol not found
  • Next by Date: Re: keyDown event processing -- harder than it looks?
  • Previous by thread: Re: dylib clarification
  • Next by thread: Re: keyDown event processing -- harder than it looks?
  • Index(es):
    • Date
    • Thread