Re: Setting Key Equiv. to a menu item without cmd key
Re: Setting Key Equiv. to a menu item without cmd key
- Subject: Re: Setting Key Equiv. to a menu item without cmd key
- From: j o a r <email@hidden>
- Date: Tue, 21 Jan 2003 22:06:59 +0100
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@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.