• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Writing a preference pane that configures hotkeys?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing a preference pane that configures hotkeys?


  • Subject: Re: Writing a preference pane that configures hotkeys?
  • From: "Rob Napier" <email@hidden>
  • Date: Mon, 24 Mar 2008 15:07:06 -0400

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@hidden> 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@hidden>
> 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 (email@hidden)

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:

This email sent to email@hidden

References: 
 >Writing a preference pane that configures hotkeys? (From: "Brian Kendall" <email@hidden>)
 >Re: Writing a preference pane that configures hotkeys? (From: Andrew Farmer <email@hidden>)
 >Re: Writing a preference pane that configures hotkeys? (From: "Brian Kendall" <email@hidden>)

  • Prev by Date: Re: Beginner with Cocoa
  • Next by Date: Re: Cocoa Database Connection
  • Previous by thread: Re: Writing a preference pane that configures hotkeys?
  • Next by thread: Re: Writing a preference pane that configures hotkeys?
  • Index(es):
    • Date
    • Thread