Keyboard Shortcuts for Copy Item Link, Add Link

Are there keyboard shortcuts for Copy Item Link and Add Link or can I add these functions as items on the Toolbar?

I know of the Link item on the toolbar (with chains), but it does not fulfill all of the above functions. It creates a link out of a highlighted text that I have typed, which is also useful, but I would like to have keyboard shortcuts or features/ buttons on the toolbar for the other linking options.

In OS X applications anything on the main menu can have a keyboard shortcut added via System Preferences. Here are Apple’s instructions. (These are for Yosemite, but the idea is the same for newer versions of OS X.)

For existing keyboard shortcuts in DEVONthink, look at the menu. The shortcuts appear next to the command name, for commands that have shortcuts. Copy Item Link is ^⌥⌘L. There is no pre-defined shortcut for Add Link… but the System Preferences method can be used to create a shortcut.

(When you are adding a shortcut for menu items that end with the three dot ellipses you will need to press Option and semicolon ( ⌥; ) to make the ellipses appear – ellipses are not three periods.)

For keyboard shortcuts, I use, and I recommend, the app/utility “Keyboard Maestro”.
It can create shortcuts for anything, not just what is offered in the System Preferences pane.

Keyboard Maestro has been mentioned previously on this forum, and it “plays nicely” with DT.

Here the website for Keyboard Maestro:

Yes, true. However, KeyboardMaestro will not make the shortcut appear in an application’s menubar – which is what the OP requested. And neither KeyboardMaestro nor System Preferences can be used to assign shortcuts to contextual menu (control-click or right-click) commands.

Thanks for your suggestions! I used Korm’s suggestion to create a keyboard shortcut using System Preferences. It really helped! I can see the shortcut appear in the drop down menu.

I only wish there was a way for me to place a button in the toolbar, but even as it is, I am fine.

Great to know about Keyboard Maestro, too. It may come in handy for me in the future.

There is a way.

  1. Copy the script below
  2. Open Script Editor, paste the copied script, compile it, and save it in ~/Library/Application Support/DEVONthink Pro 2/Scripts/Toolbar/
  3. I creatively give the script file a name like: “Get my Item Link.scpt”
  4. Quit DEVONthink. Relaunch DEVONthink.
  5. Open View > Customize Toolbar…. Scroll to the bottom of the panel of icons that will be shown and find your script (it will be shown with the name you gave it).
  6. Drag that item to your Toolbar.

If you want a custom icon, ask the internet how to change the icon of a file in OS X.

The script you need:

tell application id "DNtp"
	set theRecord to the first item of (the selection as list)
	set the clipboard to (the reference URL of theRecord) as string
end tell

1 Like

Thanks, Korm. That’s fantastic. I will try this. I am a bit nervous because I do not usually work with scripts, but I will give it a shot when I have more time.

Can this script be modified to get all of the links from a multiple selection. Right now I’m always copying links one by one because when multiple items are selected, the copy link disappears from the contextual menu

Yes, it’s possible but you need to determine what you’re doing with the data.

Hello folks. Would anybody be able to help modify korm’s above script to copy the item link of the last added item?