• 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: Handling keyDown events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handling keyDown events


  • Subject: Re: Handling keyDown events
  • From: Bill Bumgarner <email@hidden>
  • Date: Fri, 5 May 2006 13:32:30 -0700

On May 5, 2006, at 12:51 PM, Paolo Bertani wrote:

MyWindow.c and overrided keyDown method this way:

MyWindow.c? Should be MyWindow.m....

Unfortunately the overrided keyDown is not called when I type on the keyboard.

What I am missing?

Likely, the responder chain and how events are handled in Cocoa.

What is the key view when you are typing? Is the cursor blinking in a field? If so, then the field is the first responder and is accepting key events.

If you want to modify the behavior of the arrow keys for the entire window, regardless of which control is active within, my first recommendation would be to not do so as you are invariably going to end up with a UI that works differently than every other Cocoa app on the system.

However, if my guess as to your intentions is wrong -- quite likely given that I have no idea what you are actually trying to achieve -- then you will need to capture the events before they hit the responder chain.

I would suggest you refer to the Cocoa Events Overview documentation as it contains extensive information on how the entire Cocoa event handling subsystem works.

b.bum
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Handling keyDown events
      • From: Paolo Bertani <email@hidden>
References: 
 >Handling keyDown events (From: Paolo Bertani <email@hidden>)

  • Prev by Date: Re: How to control the commit of text edit field with binding?
  • Next by Date: Re: Handling keyDown events
  • Previous by thread: Handling keyDown events
  • Next by thread: Re: Handling keyDown events
  • Index(es):
    • Date
    • Thread