Intercepting Some Keyboard Events for NSTextView
Intercepting Some Keyboard Events for NSTextView
- Subject: Intercepting Some Keyboard Events for NSTextView
- From: John Nairn <email@hidden>
- Date: Sun, 14 Jul 2002 17:01:55 -0600
I read about key board events in all books and the brief Apple
documentation, but I can not handle what I want and it should be easy.
My app has several NSTextViews and NSTextFields. I want to intercept
keyboard events for special characters is some of them, but what I have
tried does not work. For example:
1. I made a custom NSWindow class. It only get keyboard events when it
is the first responder, but I need to select first responders by
clicking around fields, selecting with mouse, etc.
2. I made a custom subclass to NSScrollView containing an NSTextView,
but apparently the keyboard event goes directly to the NSTextView.
3. I tried to make a cusom class for the NSTextView (which sounds like
the best way to me), but Interface Builder says that custom class is not
application for an NSTextView.
The only thing I can think of is to us a custom NSWindow class as always
being the first responder, but then it seems like there will be a lot of
work handling flow of key board events to the right objects and then how
to control focus appearance, selections, and much more?
-----------------------
John Nairn
email@hidden
http://www.mse.utah.edu/~nairn
-----------------------
_______________________________________________
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.