I created NSApplication subclass:
class MyApplication: NSApplication {
override func sendEvent(theEvent: NSEvent) {
if theEvent.type == NSEventType.KeyUp && (theEvent.modifierFlags & .CommandKeyMask).rawValue != 0 {
self.keyWindow?.sendEvent(theEvent)
} else {
super.sendEvent(theEvent)
}
}
}
After that, I changed "Principal class" in Info.plist to MyApplication and at the end in the Application Scene in Main.storyboard, I changed Application to MyApplication, too.
When I run application I get following message:
Unable to find class: MyApplication, exiting
Can someone help me with this?
Try:
OR, you have to set Info.plist like this.
There is no exact document about this, but this description is corresponding:
and this: