Skip navigation.
 
mlRe: Setting Key Equiv. to a menu item without cmd key
FROM : j o a r
DATE : Tue Jan 21 22:06:59 2003

IIRC you _need_ to use at least the NSCommandKeyMask in order for the
keyboard shortcut to be processed for the items in the main menu. In
other words, you cannot have a menu item using only the
NSControlKeyMask, or no modifier key mask, in Cocoa applications.
I could be wrong, but I think that this is the current state of affairs.

j o a r

On Tuesday, Jan 21, 2003, at 20:49 Europe/Stockholm, Theome wrote:

> I'd like to have a menu item in the main menu of my app responding to
> the
> key backspace while the user doen't need to hold the command key.
>
> here's a snippet of the code:
>
>    [menuItemDelete setKeyEquivalent:@"\b"];
>    [menuItemDelete setKeyEquivalentModifierMask:0];
>
> the main menu doesn't seem to receive the event when the, and I
> couldn't
> figure out why. I tried to set [NSApp mainMenu] to my view's
> nextResponder,
> but this didn't work as NSMenu does not inherit froom NSResponder.

_______________________________________________
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
mlSetting Key Equiv. to a menu item without cmd key Theome Jan 21, 20:49
mlRe: Setting Key Equiv. to a menu item without cmd key j o a r Jan 21, 22:06