On Sep 3, 2009, at 1:03 PM, [email protected] wrote:

I added an NSControlTextDidChangeNotification for a text field and I was wondering if there is a way to see what key was pressed when the selector is called?

Nope — this notification is higher level and happens after any user- driven change; it's not directly related to a particular input event. Text can be changed without keystrokes. For example, the user might have used drag-and-drop to insert or move text in the field, without any keystroke at all. Or they might have used mouse clicks in an input- method panel to create a CJK character.

What precisely are you trying to do? If you really need to look at every keystroke, you'll probably have to override keyDown:, but this is tricky to do because the view you have to override it in is the window's field editor, not the control itself.

—Jens_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to