I’m searching for a way to programmatically perform a keyboard shortcut, just as if the user had clicked the keys himself. That shortcut, however, is chosen by the user with a custom control called ShortcutRecorder.
Is there any way to take the info given by ShortcutRecorder (basically the key code and the flags, I think) and perform that shortcut?
You can use
CGEventPost()to post keyboard events system-wide, but the user will have to enable access for assistive devices in the Universal Access System Preferences pane.