Handling keydown events
Handling keydown events
- Subject: Handling keydown events
- From: Paolo Caturegli <email@hidden>
- Date: Sat, 24 Nov 2001 18:06:13 +0100
- Organization: Centro Ser.R.A. - University of Pisa
Hello I'm new to the list (and to cocoa too).
I need to handle keydown events from my app.
Following what "Learning Cocoa" book states I've create a controller
(NSObject) for my (MVC) application using IB and making the correct
wiring there. The application works fine.
From inside the controller I would like to intercept keydown events
before they get passed to the only window I use.
I overrided the defs for both sendEvent & keyDown (this because
sendEvent do not work) but there is no way to get into the code I've
inserted in the overrided sendEvent (or KeyDown): the app build up fine
but simply ignore my (both) override.
What I'm missing? Reading chap 8 of the book seems I'm doing the correct
action.
Can an NSObject use NSResponder methods such sendEvent, keyDown or
mouseDown directly or I have to do something else?
Any clue?
Thank you.
Ciao
Paolo