• 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: Capture "Space" key event
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Capture "Space" key event


  • Subject: Re: Capture "Space" key event
  • From: Matt Jaffa <email@hidden>
  • Date: Fri, 5 Mar 2004 08:20:39 -0700

Allan,

In my Program I tried making my window it a subclass of NSWindow
And using that keyDown:(NSEvent*)anEvent
to get the delete key so I can delete a row from my NSTableView,
but it is not working, in fact the keyDown is not getting any events at all.
Is there something I am missing?

MAtt


On Mar 5, 2004, at 8:05 AM, Allan Odgaard wrote:

On 5. Mar 2004, at 14:53, Mathew Peterson wrote:

My guess was to sub class NSApplication, but of course events don't get passed down the chain.

From the NSApplication documentation, so I would think your guess is correct:

- (void)sendEvent:(NSEvent *)anEvent

Dispatches anEvent to other objects. You rarely invoke sendEvent: directly, although you might want to override this method to perform some action on every event. sendEvent: messages are sent from the main event loop (the run method). sendEvent: is the method that dispatches events to the appropriate respondersNSApp handles application events, the NSWindow indicated in the event record handles window-related events, and mouse and key events are forwarded to the appropriate NSWindow for further dispatching.
_______________________________________________
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.


  • Follow-Ups:
    • Re: Capture "Space" key event
      • From: Allan Odgaard <email@hidden>
References: 
 >Capture "Space" key event (From: Mathew Peterson <email@hidden>)
 >Re: Capture "Space" key event (From: Allan Odgaard <email@hidden>)

  • Prev by Date: Re: Capture "Space" key event
  • Next by Date: drag and drop: NSView vs. NSImageView
  • Previous by thread: Re: Capture "Space" key event
  • Next by thread: Re: Capture "Space" key event
  • Index(es):
    • Date
    • Thread