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

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


  • Follow-Ups:
    • Re: Handling keydown events
      • From: Carlos Weber <email@hidden>
  • Prev by Date: Re: How do I load resources from NSBundle correctly?
  • Next by Date: Re: Instance methods VS. Class methods
  • Previous by thread: Re: How do I load resources from NSBundle correctly?
  • Next by thread: Re: Handling keydown events
  • Index(es):
    • Date
    • Thread