Re: User-defined global hotkeys
Re: User-defined global hotkeys
- Subject: Re: User-defined global hotkeys
- From: Jean Le Clerc <email@hidden>
- Date: Wed, 15 Jun 2005 19:21:55 -0400
I had read this, but your last post made me hope that this was not
the only way to go... Sorry, I misunderstood you. That's sad - real
sad, in my case... Ok, assuming I'm stuck with the command-shift mask
(I'll see if my client accepts it), now I need to know if I can at
least change the letter shortcut (that's right isn't it, I'm stuck
with _letters_? No function keys?) dynamically...
Thanks!
On Jun 15, 2005, at 7:16 PM, Daniel Jalkut wrote:
You're barking up the wrong tree. If you want your "keyboard
shortcuts" to show up in the services menu, then you do so by
advertising services:
http://developer.apple.com/documentation/Cocoa/Conceptual/
SysServices/Concepts/properties.html
I don't know if there's any way of changing a service's keyboard
shortcut dynamically.
Daniel
On Jun 15, 2005, at 3:37 PM, Jean Le Clerc wrote:
All right - I'm back... I'm missing something here. I've used the
HotKeys wrapper to let the user define keyboard shortcuts in my
system preference pane, for me faceless service application. So
far so good. But now, how do I:
1) Show the keyboard shortcuts in the "Services" menu
and
2) Set the shortcut's action to pass the same info the menu item
would give me? (pasteboard, userdata, etc...) Basically, how do I
link the keyboard shortcuts with the services menu items?
Sorry if this is basic Cocoa, I'm still suckling my cocoa bean
here...
Thanks!
On Jun 14, 2005, at 11:31 AM, Daniel Jalkut wrote:
On Jun 14, 2005, at 3:03 AM, Jean Le Clerc wrote:
2) can I, somehow, use these to automatically "register" my
service's shortcuts? If so, how would I go about that?
I don't think so. You would have to have a menu item at all times
that matched the keyboard shortcut you are defining. Is this the
case? If so then the user can set a shortcut but it is, in my
opinion, a clunky way of defining shortcuts because the user has
to get the menu title exactly right, etc.
3) if I have to re-create a GUI to save the keyboard shortcuts
in _my_ preference pane, am I to understand that the only key-
modifiers allowed are command-shift?
That's a misunderstanding. You can also use control and option,
and starting in 10.3, you can choose to use no modifiers at all.
You're going to want to use the Carbon RegisterEventHotKey
mechanism. If you search the archives you'll see that some
people have Cocoa-wrappers for this.
Daniel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden