• 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: Two mnemonics in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two mnemonics in Cocoa


  • Subject: Re: Two mnemonics in Cocoa
  • From: Sam Griffith <email@hidden>
  • Date: Thu, 21 Nov 2002 02:34:38 -0600

Hey Chad,

You should look at NSResponders keyUp: method. You can look at the Event
object and from that determine what key is down and which modifiers (cmd,
opt, cntrl). As for doing something like zoom in and zoom out. Even
Photoshop will implement them as two different methods. You just need to
check which key was pressed and call the correct method.

Hope this helps,

--
Sam Griffith Jr.
email: email@hidden
Web site: http://homepage.mac.com/staypufd/index.html

On 11/21/2002 1:48 AM, "Chad Armstrong" <email@hidden> wrote:

> Is it possible to assign two mnemonics or key combinations to one
> command? What I'd like to do is something similar in Photoshop when the
> user types either Command + or Command = will zoom in. I've found some
> functions which can tell if a META key such as Command, Option or Shift
> was pressed, but I'm not quite certain how I might use that
> functionality to check if a particular key combination was pressed.
> Granted, the Interface Builder allows for one key combo to be assigned
> to a particular button or menu item, but I would like to have two key
> combinations joined to the same functionality.
>
> Regards,
>
> Chad Armstrong
> _______________________________________________
> 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.
_______________________________________________
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.

References: 
 >Two mnemonics in Cocoa (From: Chad Armstrong <email@hidden>)

  • Prev by Date: How to make a window to become active when it becomes frontMost ?
  • Next by Date: Re: mouseEntered event in NSWindow subclass
  • Previous by thread: Two mnemonics in Cocoa
  • Next by thread: Re: Two mnemonics in Cocoa
  • Index(es):
    • Date
    • Thread