I just had the same twist problem ...
The space key equivalent works fine in my application, and the associated NSMenuItem IBAction is in the application delegate.
If I translate IBAction into a dedicated controller, it fails. All other equivalents of the menu keys continue to work, but the spacebar does not respond (this is normal with the modifier key, but unmodified @ "" does not work).
I tried various workarounds, such as binding directly to the controller and binding through a chain of responders, but to no avail. I tried the code:
[menuItem setKeyEquivalent:@" "]; [menuItem setKeyEquivalentModifierMask:0];
and the way to build the interface, the behavior is the same
I tried to subclass NSWindow, like Justin's answer, but so far have not been able to get this to work.
So, so far I have given up and moved this IBAction to the App Delegate, where it works. I don’t see this as a solution, I just do it ... maybe it’s a mistake, or (rather) I just don’t understand the event messages and the responder chain is good enough.
source share