Re: Handling keyDown events
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