Re: capture modifier key events

2008-06-18 Thread Mattias Arrelid
Hi Apparao,

On Wed, Jun 18, 2008 at 7:55 AM, Apparao Mulpuri
[EMAIL PROTECTED] wrote:
 I have a NSTextField, in which i have to update with new string
 value when ever user presses Cmd, Control or Option keys. I have tried
 with keyDown and controlDidChange methods. These are working with
 combination of other keys includes nemuric, character and functional
 keys.

 Is there any provision, to capture only modifier keys (with out
 pressing on other keys) events in Cocoa.

If you have a subclass of NSTextField (or any class that inherits from
NSResponder) you could override the flagsChanged: method. It will be
called as soon as the user holds down any of the control keys. Read
more about it in the documentation set on NSResponder.

Good luck
Mattias
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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]


capture modifier key events

2008-06-17 Thread Apparao Mulpuri
Hi,

   I have a NSTextField, in which i have to update with new string
value when ever user presses Cmd, Control or Option keys. I have tried
with keyDown and controlDidChange methods. These are working with
combination of other keys includes nemuric, character and functional
keys.

   Is there any provision, to capture only modifier keys (with out
pressing on other keys) events in Cocoa.

Thanks  Regards,
- Apparao M.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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]