Re: Command Key physical key down
Re: Command Key physical key down
- Subject: Re: Command Key physical key down
- From: Henry McGilton <email@hidden>
- Date: Thu, 2 Oct 2003 19:36:44 -0700
On Thursday, October 2, 2003, at 11:51 AM, Greg Titus wrote:
On Thursday, October 2, 2003, at 11:24 AM, robert l clair wrote:
Can someone point me to a lead on how to get the actual key press
for the command and other modifier keys ? (As opposed to determining
whether they are up or down when another key is pressed.)
Implement the method -flagsChanged: in an NSResponder
(view/window/whatever). It will get called when modifier keys go up or
down exactly the same way as -mouseDown:/-mouseUp: or > -keyDown:/-keyUp:
Thanks Greg for pointing this one out.
For completeness, there is another way to get key down information in
the
context of methods such as mouseMoved, where you would use the
NSEvent -modifierFlags method and then masking with the key
masks defined in the NSEvent documentation. The masks are all
of the form NSxxxxxxxxxxKeyMask.
My slightly different requirement is to watch for the Option key
going down while tracking the mouse in the mouseMoved method
of a view.
Best Wishes,
........ Henry
===============================+============================
Henry McGilton, Boulevardier | Trilithon Software
Objective-C/Java Composer | Seroia Research
-------------------------------+----------------------------
mailto:email@hidden |
http://www.trilithon.com
|
===============================+============================
_______________________________________________
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.