• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: catching command-enter keyDown events in a table view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Sheets and hidden apps
  • Next by Date: NSArrayController and retainCount
  • Previous by thread: Re: catching command-enter keyDown events in a table view
  • Next by thread: Re: QuickTime stops to play
  • Index(es):
    • Date
    • Thread