Re: capture modifier key events
Re: capture modifier key events
- Subject: Re: capture modifier key events
- From: "Mattias Arrelid" <email@hidden>
- Date: Wed, 18 Jun 2008 10:44:44 +0200
Hi Apparao,
On Wed, Jun 18, 2008 at 7:55 AM, Apparao Mulpuri
<email@hidden> 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 (email@hidden)
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:
This email sent to email@hidden