cocoa - Programmatically adding glyphs (delete key, backspace, space, etc) to menu item -


It is used in Carbon that you can use SetMenuItemKeyGlyph What is optional under 10.6? Am I inappropriate goodness or ...?

Thanks

will need to be used - [NSMenuItem setKeyEquivalent :] and enter a NSString of the character you want to use NSMenuItem for @ "" in Space will translate , etc.

Delete the key ("backspace" is the regular delete button on your keyboard):

PreMeCyEquivalent: [NSString stringWithFormat: @ "% c", 0x08]] ;

Forward delete key ("Dell" key):

  [myMenuItem setKeyEquivalent: [NSString stringWithFormat: @ "% c", 0x7f]];  

space:

  [myMenuItem setKeyEquivalent: @ ""];  

tab:

  [myMenuItem setKeyEquivalent: [NSString stringWithFormat: @ "% c", 0x09]];  

Comments