2

I have a menu item that by default uses app state to trigger its enabled-ness. But in very rare situations (usually during interaction with customer support), we need to allow the user to trigger the same menu even though that app has disabled it. It sounds like a great use case for alternate menuitems. By having the "do x" menu and it's alternate "force do x" we can hide this form users under normal situations.

However, the alternate menuitem seems to only work when given a keyboard shortcut, which I'd like to avoid. I've tried changing the name and enabled state from validateMenuItem:, but that only allows us to trap for option key presses before the menu is opened, not while the menu is displayed like a standard alternate menuitem.

Is there any way to have an alternate menuitem for a menu with no keyboard shortcut?

  • 4
    I just tried this out, and it worked as expected for me. The alternate menu item needs to have it's key equivalent set to Option (⌥). If that's not working for you, I think you need to add an example to your question... – TheNextman Nov 02 '19 at 03:53
  • That worked! For some reason it never occurred to me to make the key equivalent just option (since that would never trigger the menuitem). – Mike Woodworth Nov 04 '19 at 22:14

0 Answers0