I i create a KeyPress to use as a shortcut for a command that contains the deleteKey or backspaceKey they won’t show up visually on the Mac.
So if i specify the KeyPress like this:
KeyPress(backspaceKey, ModifierKeys::commandModifier, 0 )
The command get’s triggered but no visual representation will be visible in the menu
I found some info about this in the NSMenuItem reference
This is the important part.
If you want to specify the Backspace key as the key equivalent for a menu item, use a single character string with NSBackspaceCharacter (defined in NSText.h as 0x08) and for the Forward Delete key, use NSDeleteCharacter (defined in NSText.h as 0x7F). Note that these are not the same characters you get from an NSEvent key-down event when pressing those keys.
So i tried this, and of course it shows in the menu but it won’t actually trigger the command.
KeyPress(0x08, ModifierKeys::commandModifier, 0 )
Any thoughts on how to fix this elegantly Jules?