Set Custom KeyEquivalent in Services Menu
OmniFocus has a Cocoa Service that allows you to create tasks based upon
selected items.
It has a preference that allows you to set the keyboard shortcut that
triggers the Service. This is not just a global hotkey, it's a bona fide
Service that shows up in the menu.
You can the keyboard shortcut to pretty much any combination, including
combinations with ⌥ and ^. This functionality is not documented -
the docs seem to say that KeyEquivalents must be a
⌘+[⇧]+someKey.
Once this is set, I observe three things:
The OmniFocus Info.plist file does not contain a KeyEquivalent listed.
This is not surprising, as the file is read-only.
The pbs -dump_pboard utility lists NSKeyEquivalent = {}; for the service.
Using NSDebugServices lists this interesting line that does not show up
with most debugging sessions (Obviously, for keyboard shortcut
⌃⌥⌘M): OmniFocus: Send to Inbox
(com.omnigroup.OmniFocus) has a custom key equivalent:
<NSKeyboardShortcut: 0x7fb18a0d18f0 (⌃⌥⌘M)>.
So my questions are twofold, and I suspect they are related:
How do you dynamically change a service's KeyEquivalent?
How do you set the KeyEquivalent to a combination including ⌃ and
⌥
Thank you!
No comments:
Post a Comment