global key bindings
-
I've got an application that does not seem to react to global key
bindings defined in the "Keyboard&Mouse" preference pane. The assigned
key binding appears next to the menu item, but the application does
not seem to react.
The application only has an icon with menu in the menu bar, but no
Dock icon or its own menu bar.
The menu item is bound (in Interface builder) to the appropriate
message, but it seems we don't even get that far.
Any help would be appreciated. -
On Aug 27, 2008, at 10:18 AM, David Reitter wrote:> I've got an application that does not seem to react to global key
> bindings defined in the "Keyboard&Mouse" preference pane. The
> assigned key binding appears next to the menu item, but the
> application does not seem to react.
>
> The application only has an icon with menu in the menu bar, but no
> Dock icon or its own menu bar.
Menus contained in NSStatusItems (and displayed on the right side of
the menubar) don't currently respond to command keys at all. This is
already reported in Radar.
-eric -
On 28 Aug 2008, at 00:27, Eric Schlegel wrote:>
>
> Menus contained in NSStatusItems (and displayed on the right side of
> the menubar) don't currently respond to command keys at all. This is
> already reported in Radar.
Thanks, I'll stop looking then.
FWIW, the binding does work once the menu is shown. Also, Adium
somehow manages to pull it off, too.
Can you give me a pointer on how to implement global key bindings?
(Again, the app has no menu / Dock icon and would want to receive the
event without having focus. I need something like Hot Keys in Carbon.)
- David -
Le 28 août 08 à 14:21, David Reitter a écrit :> On 28 Aug 2008, at 00:27, Eric Schlegel wrote:
>>
>>
>> Menus contained in NSStatusItems (and displayed on the right side
>> of the menubar) don't currently respond to command keys at all.
>> This is already reported in Radar.
>
> Thanks, I'll stop looking then.
> FWIW, the binding does work once the menu is shown. Also, Adium
> somehow manages to pull it off, too.
>
> Can you give me a pointer on how to implement global key bindings?
> (Again, the app has no menu / Dock icon and would want to receive
> the event without having focus. I need something like Hot Keys in
> Carbon.)
So use Carbon Hot Keys.
http://developer.apple.com/samplecode/FunkyOverlayWindow/listing7.html -
On Aug 28, 2008, at 5:21 AM, David Reitter wrote:> Can you give me a pointer on how to implement global key bindings?
> (Again, the app has no menu / Dock icon and would want to receive
> the event without having focus. I need something like Hot Keys in
> Carbon.)
Use the hot key API in Carbon. That's the only API for global hotkeys
at the moment.
-eric


