Send a keyboard shortcut to a Mac OS X Window
Is it possible for one window on a Mac desktop to programatically send a keyboard shortcut or key sequence to another? I'm looking to control an application which offers no API to do such, by using the application's keyboard shortcut features. I'm fairly sure this can be done on Windows, but Mac? Thanks fardjad One way to do this is embedding Applescript in your Objective-C application. For example executing this apple script, sends Command + M to System Events application: tell application "System Events" to keystroke "m" using {command down} You can embed the script above in your Cocoa