Adding a global monitor with NSEventMaskKeyDown mask does not trigger
问题 I'm working on a MacOS menu bar app which needs to track some global shortcuts in order to facilitate adjusting display brightness on external monitors. However, I cannot get it to fire a handler on any keyboard related events (mouse events work just fine). I'm checking Accessibility with the following code NSDictionary *options = @{CFBridgingRelease(kAXTrustedCheckOptionPrompt): @YES}; BOOL accessibilityEnabled = AXIsProcessTrustedWithOptions((CFDictionaryRef)options); Then, I'm adding a