See General/HotKeysLib?, which is available at http://rogueamoeba.com/sources/HotKeysLib3.tgz and General/ShortcutRecorder, a control that uses General/HotKeysLib (General/PTHotKey, et al): http://wafflesoftware.net/shortcut/
The above is the suggested refactoring for the below conversation.
How would I go about making my app send a system-wide keydown event, like in Apple’s floating keyboard application?
Welcome to General/CocoaDev! Please do not post General/SingleQuestionAndAnswer pages on the wiki; instead, use the forums so we can avoid General/MailingListMode.