I am trying to replace my current plaintext note system with DEVONthink. I am currently using nvAlt, which gives me a single keyboard shortcut to search existing notes and create new notes.
I can use the keyboard shortcut for DEVONthink Sorter to create new notes, but I can’t find a good way to bind a keyboard shortcut to bring DEVONthink to the foreground and start a global search.
I can use Keyboard Maestro to bring the DEVONthink to the foreground, but I can not find a keyboard shortcut or a way via AppleScript to search across all open databases.
Is there either a keyboard shortcut I can’t find (or have overlooked) or a way in AppleScript to switch to the Global Inbox and focus the search field? Or is there another approach that I have not thought of or am overlooking?
You could use the search window (see Tools > Search…) to search in all databases. However, there’s no global shortcut available to activate this window. One workaround might be DEVONsphere Express which can also search in DEVONthink Pro’s databases.
I was trying something similar some time ago. I wanted a new search window in the actual space without activating other DEVONthink windows (and loosing focus on the actual space this way). In the end this worked for me:
I assigned a shortcut [F + CTRL + OPTION + CMD] for the DEVONthink menu „Search…“ in system preferences → keyboard → app shortcuts. With this I can open the search window if DEVONthink is frontmost.
I assigned a shortcut [OPTION + D] in Alfred to this AppleScript, which activates DEVONthink and calls the Shortcut assigned in 1.
tell application "System Events"
set A to processes
if A does not contain "DEVONthink Pro" then
tell application "DEVONthink Pro"
activate
end tell
end if
tell process "DEVONthink Pro"
set frontmost to true
keystroke "f" using {control down, option down, command down}
key code 51
activate
end tell
end tell
Ah ok, I believe I couldn’t remember the default one before I had the one in Alfred set up and just forgot about it. Always looking to assign shortcuts I already use over different apps, and that gets messy sometimes
Since this was some time ago I had to update the script to look like this to work.
tell application "System Events"
set A to processes
if A does not contain "DEVONthink 3" then
tell application "DEVONthink 3"
activate
end tell
end if
tell process "DEVONthink 3"
set frontmost to true
keystroke "f" using {command down, option down}
end tell
end tell