• 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
Forwarding keyDown and keyUp
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Forwarding keyDown and keyUp


  • Subject: Forwarding keyDown and keyUp
  • From: Rick Bischoff <email@hidden>
  • Date: Fri, 16 Jul 2004 09:15:36 -0500

Hi,

I have a multiple window application-- in one window (window A), which will be active most of the time, there is no input text field. However, I would like to be able
to intercept any keyboard events from this window and forward them to the input text field in the other window (window B). Thus far I have done the following:

1. Connected window A's initial first responder outlet to my custom view. (the only UI element in the window)
2. Overrode -(BOOL)acceptsFirstResponder to return YES in said custom view.
3. Overrode -(void)keyDown:(NSEvent*)theEvent and -(void)keyUp:(NSEvent*)theEvent to
send the messages (via a series of controllers) to the input text field in window B.

However, when I attempt to type anything while window B is active, all I get is system beep sounds which means something somewhere isn't working right.

What steps am I missing? Easier way to do it?

Thanks,
Rick
_______________________________________________
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.


  • Prev by Date: Re: cocoa-dev digest, Vol 2 #4492 - 17 msgs
  • Next by Date: Re: Changing Cell Size in a TableView?
  • Previous by thread: Re: Changing Cell Size in at TableView?
  • Next by thread: Re: Changing Cell Size in a TableView?
  • Index(es):
    • Date
    • Thread