Take a look at shortcutrecorder: http://code.google.com/p/shortcutrecorder. Full IB3 support isn't *quite* there in the released versions, but it's all very close to what you're talking about, and while updates have been a little slow there (*), its much more recently maintained than Nathan's page.
(*) Another on my list of free projects that I use and need to carve out some time to lend a hand on. -Rob On Mon, Mar 24, 2008 at 1:47 AM, Brian Kendall <[EMAIL PROTECTED]> wrote: > > Sorry - perhaps I wasn't clear enough. > > This is a preference pane for a background application, which actually > registers the hot key with the system. The preference pane just needs to > have some kind of button or text field so that the user can input *which* > hotkey they want the background app to use. Unfortunately, that requires > lower level access to what keys are being pressed than I know how to get > in a preference pane. > > I could use an event tap, but that seems like it's way too low level, and > I suspect that there must be an easier, more cocoa friendly way. All I > need is for the pref pane to be able to intercept one keystroke, complete > with modifier keys, like in the Keyboard & Mouse pref pane, though it > doesn't necessarily have to work the same way. I've seen other 3rd party > preference panes record keystrokes for hotkeys after pressing a button, so > obviously it's possible. I just don't know quite how. > > - Brian > > > On Sun, 23 Mar 2008 22:34:16 -0400, Andrew Farmer <[EMAIL PROTECTED]> > wrote: > > > On 23 Mar 08, at 19:26, Brian Kendall wrote: > >> I'm trying to write a preference pane that allows the user to specify a > >> hotkey. Ordinarily I would override sendEvent in NSApplication, but > >> since it's a preference pane that's not possible in this case since the > >> System Preferences application is already instantiated. Obviously this > >> is possible, since many other preference panes do this, including the > >> Keyboard & Mouse pref pane. What's the propper way to go about doing > >> this? > > > > Create a helper app that runs in the background. Preference panes only > > "exist" while they're open, so registering a hotkey there doesn't do you > > much good. > -- Rob Napier -- Software and Security Consulting -- http://robnapier.net _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]