Skip navigation.
 
mlRe: Two mnemonics in Cocoa
FROM : j o a r
DATE : Thu Nov 21 09:37:24 2002

Read the documentation for "performKeyEquivalent:" in NSResponder,
NSView and NSButton.
Most likely you could simply create a subclass of the appropriate
control and override "performKeyEquivalent:" and in that way catch any
number of keyboard shortcuts per instance of that control.

j o a r

On Thursday, Nov 21, 2002, at 08:48 Europe/Stockholm, Chad Armstrong
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.

_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlTwo mnemonics in Cocoa Chad Armstrong Nov 21, 08:48
mlRe: Two mnemonics in Cocoa Sam Griffith Nov 21, 09:34
mlRe: Two mnemonics in Cocoa j o a r Nov 21, 09:37
mlRe: Two mnemonics in Cocoa Ondra Cada Nov 21, 15:00
mlRe: Two mnemonics in Cocoa Dustin Voss Nov 23, 19:49