Hi Fred,
I am creating menu items with
- (id)initWithTitle:(NSString *)aString action:(SEL)aSelector
keyEquivalent:(NSString *)charCode;
and would like this menu item to fire its action when the user presses
Command-CursorRight. What charCode string would I have to pass for
this?
I have really no idea!
The file NSEvent.h has
NSRightArrowFunctionKey = 0xF703,
but I am not sure if this value as the first character of an Unicode
string will actually work. Give it a try and report back to the list.
Here some simple untested example code:
{
unichar c = NSRightArrowFunctionKey;
NSString *s = [NSString stringWithCharacters: &c length: 1];
[mi setKeyEquivalent: s]
}
Yes, this worked indedd, except that [] is displayed in the menu item
which looks somehow ugly. A better default for non-printable shortcuts
would be IMHO to show nothing. Or does anybody have an idea where we
could find a glyph for cursor right? Apple is showing a little right
arrow in their Preview.app!?
Regards,
Andreas
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep