• 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: Jens Alfke <email@hidden>
  • Date: Sun, 23 Mar 2008 22:46:27 -0700


On 23 Mar '08, at 7:26 PM, Brian Kendall wrote:
I'm trying to write a preference pane that allows the user to specify a hotkey.

Take a look at Nathan Day's "NDHotKeyEvent" utility code: http://homepage.mac.com/nathan_day/pages/source.xml The description is:
This is a class for providing access to carbon hot keys from Cocoa, as well as acting as instances that represent particular hot key combinations, the class object provides some methods for managing all of the hot keys created with NDHotKeyEvent.

NDHotKeyEvent can send messages from both key down events and key up events and there is also a informal protocol to notify the target class when the NDHotKeyEvent instance is going to change target.

The NDHotKeyEvent project also comes with a class called NDHotKeyControl which can be used for obtaining hot key combinations from the user.


It sounds like NDHotKeyControl is what you want for the configuration UI in your pref-pane.
(I haven't used any of this code; I just happened to bookmark it a few days ago.)


—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

  • Follow-Ups:
    • Re: Writing a preference pane that configures hotkeys?
      • From: "Brian Kendall" <email@hidden>
    • Re: Writing a preference pane that configures hotkeys?
      • From: "Brian Kendall" <email@hidden>
References: 
 >Writing a preference pane that configures hotkeys? (From: "Brian Kendall" <email@hidden>)

  • Prev by Date: Re: How do I disable this warning: "local declaration of 'varname' hides instance variable"
  • Next by Date: Re: How do I disable this warning: "local declaration of 'varname' hides instance variable"
  • 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