FROM : Jens Alfke
DATE : Mon Mar 24 06:46:27 2008
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
DATE : Mon Mar 24 06:46:27 2008
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
| Related mails | Author | Date |
|---|---|---|
| Brian Kendall | Mar 24, 03:26 | |
| Andrew Farmer | Mar 24, 03:34 | |
| Jens Alfke | Mar 24, 06:46 | |
| Brian Kendall | Mar 24, 06:47 | |
| Brian Kendall | Mar 24, 06:49 | |
| Rob Napier | Mar 24, 20:07 | |
| Brian Kendall | Mar 25, 14:38 | |
| Nathan Day | Mar 26, 14:56 | |
| Brian Kendall | Mar 27, 07:18 | |
| Nathan Day | Mar 27, 08:21 | |
| Brian Kendall | Mar 27, 15:24 |






Cocoa mail archive

