FROM : Satoshi Matsumoto
DATE : Sat Apr 02 22:35:37 2005
on 05.4.3 1:59 AM, Roland Silver at <email_removed> wrote:
> I have a simple Cocoa application with a controller and a window with
> an NSTextView. I want to intercept keydown events on their way to the
> text view, process them with a function or method, and send a possibly
> different keydown event on to the text view.
> Nothing I try works.
> Any suggestions?
Subclass NSTextView and override following method.
- (void)keyDown:(NSEvent *)theEvent
And if you wish to intercept all key events including all menu short cuts,
subclass NSApplication and override following method.
- (void)sendEvent:(NSEvent *)theEvent
Satoshi
-----------------------------------------------------
Satoshi Matsumoto <<email_removed>>
816-5 Odake, Odawara, Kanagawa, Japan 256-0802
DATE : Sat Apr 02 22:35:37 2005
on 05.4.3 1:59 AM, Roland Silver at <email_removed> wrote:
> I have a simple Cocoa application with a controller and a window with
> an NSTextView. I want to intercept keydown events on their way to the
> text view, process them with a function or method, and send a possibly
> different keydown event on to the text view.
> Nothing I try works.
> Any suggestions?
Subclass NSTextView and override following method.
- (void)keyDown:(NSEvent *)theEvent
And if you wish to intercept all key events including all menu short cuts,
subclass NSApplication and override following method.
- (void)sendEvent:(NSEvent *)theEvent
Satoshi
-----------------------------------------------------
Satoshi Matsumoto <<email_removed>>
816-5 Odake, Odawara, Kanagawa, Japan 256-0802
| Related mails | Author | Date |
|---|---|---|
| Roland Silver | Apr 2, 18:59 | |
| Bryan Zarnett | Apr 2, 19:13 | |
| Satoshi Matsumoto | Apr 2, 22:35 | |
| Roland Silver | Apr 3, 02:36 | |
| Roland Silver | Apr 3, 02:42 | |
| James Spencer | Apr 3, 06:43 | |
| Bryan Zarnett | Apr 3, 09:38 | |
| Bryan Zarnett | Apr 3, 10:07 | |
| Satoshi Matsumoto | Apr 3, 13:54 | |
| Douglas Davidson | Apr 4, 17:43 |






Cocoa mail archive

