Re: catching command-enter keyDown events in a table view
Re: catching command-enter keyDown events in a table view
- Subject: Re: catching command-enter keyDown events in a table view
- From: Harilaos Skiadas <email@hidden>
- Date: Thu, 4 Nov 2004 10:41:25 -0800 (PST)
Hi Ben,
I think what you need is NSEvent's modifierFlags:
method. In particular, comparing it to
NSCommandKeyMask. The documentation on NSEvent has all
this info and more:
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSEvent.html#//apple_ref/doc/uid/20000016/BBCGEBIG
I hope this helps, haven't tried it myself. In my app,
I only cared about catching arrow up and arrow down
presses.
Haris
>Hi all,
>
>I got stuck while I was trying to catch command-enter
keyDown >events in
>my NSTableView.
>I subclassed NSTableView and added keyDown: and
insertNewLine: >and i
>can now successfully work with my code after an enter
was pressed >on my
>tableview, but how can I check if the command (apple)
or any other
>modifier key for that matter was pressed at the same
time?
>
>Thanks,
>
>Ben
__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden