Devonian Times Masthead

The DEVONtechnologies Blog

How to Add Contextual Shortcuts

May 7, 2024 — Jim Neumann
Screenshot showing shortcuts defined in the application custom shortcuts.

In macOS’ System Settings or with the help of Houdah CustomShortcuts, you can set up a keyboard shortcut to quickly open documents from DEVONthink in a specific, non-default application. This Open with action is contextually-sensitive as it depends on the file type of the selected document. Therefore, you can use the same shortcut for different file types. Here is, how that works.

CustomShortcuts makes assigning shortcuts a pretty easy process. Alternatively, this can also be done in macOS’ System Settings > Keyboard > Keyboard Shortcuts > App Shortcuts.

  1. Create a new shortcut by pressing the plus button (+).
  2. As App choose DEVONthink.
  3. Enter the exact case-sensitive name of the command, but include the menu path. Using bookmarks as an example file type, enter the menu path as: Data->Open with->Firefox. In CustomShortcuts, use the Tab key; in System Settings, use ->.
  4. Since the default command is ⇧⌘O, enter this shortcut as ⇧⌥⌘O.
  5. Back in DEVONthink, select a bookmark, then view the Data > Open with menu. You should see the new shortcut on Firefox.
  6. Press ⇧⌥⌘O and the bookmark opens in Firefox.

Next, create a new shortcut for a different file type, say a PDF document. For example, this shortcut could be Data->Open with->PDF Expert. Then use the same shortcut you previously used, ⇧⌥⌘O. Now, select a PDF document, check the Open with menu and you’ll see the same shortcut applied.

This works because the Open with menu is contextually-sensitive. The applications listed are different when you have a bookmark versus a PDF document selected. So selecting different file types, allows the shortcut to be matched in different contexts.