3

Sometimes I need to copy many link addresses and I would like a hotkey for this. As far as I know there is no browser that supports that out of the box. Is it possible to customize this behavior?

I want to assign a shortcut or hotkey like CTRL+C" (e.g. CTRL+D) to the function "Copy link address". In Chrome I need to rightclick the link and then select the option.

Is this possible in Chrome or Firefox? I would prefer those two but if it not possible I would accept another browser as well.

I came up with the following temporary solution for Chrome (Thanks to surfasb)

AutoHotKey Script

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#c::
Click right
Loop 5
{
    Send {Down}
}
Send {Enter}

I would still prefer a browser customization, but until someone posts one I will go with this.

6 Answers 6

3

You can use AutoHotkey to make this happen.

3
  • Thank you. I wrote a script (see above). If no better solution comes up I will accept yours.
    – ayckoster
    Sep 18, 2011 at 15:22
  • Yeah, I know it isn't a perfect solution, but it's the fastest and the most benefit. I'm sure if you pay a Chrome dev ten bucks he'll write one real quick. My 2 cents.
    – surfasb
    Sep 18, 2011 at 16:54
  • On that note, it won't be the first time I've bribed a freeware dev to include a feature I've want. . .
    – surfasb
    Sep 18, 2011 at 16:57
2

A different Chrome-specific Autohotkey script than in the question:

#NoEnv
SendMode Input

#IfWinActive, ahk_class Chrome_WidgetWin_1
!c::
Send, {AppsKey}
Send, e

Using e instead of the loop is a strict improvement, since it doesn’t rely on the Copy Link Location being specifically the 6th entry, and doesn’t require a loop. I have read that this can conflict with Firebug, but I do not have that installed (does Firebug even have any advantages over the built-in Chrome devtools these days?).

The other change is AppsKey, and that’s more of a use-case thing. By using AppsKey, the currently-active link (e.g. highlighted, or selected with Tab) is the one that has its link copied, regardless of where the mouse is. This is much closer to the behavior of the default Copy command, and allows truly keyboard-only link copying (e.g. going down a list with Tab and using Alt+C on each).

1
  • For me, AppsKey didn't open a menu which contains the right entry (copy link location or similar), however "e" was perfect for the basic mouse right-click menu as a shortcut key. Not sure how this works currently. Possibly nowadays Chrome has a built-in "Copy link address" in the menu with "e" as the shortcut.
    – Jim Hoyle
    Dec 16, 2020 at 7:26
1

From your script, it looks like you're doing this:

  1. Float over link with mouse
  2. Hit your shortcut key (Ctrl+C)

You could instead;

  1. Right click the link
  2. Press "a" (firefox) ("Copy Link Location")
2
  • Ah, nm you deleted the script.
    – surfasb
    Sep 18, 2011 at 17:01
  • I was referring to the script in the OP
    – RJFalconer
    Sep 18, 2011 at 17:05
1

You can copy all links to clipboard with the Firefox linky plugin.

1
  • Thank you for the tip, but I do not want to copy all addresses. I usually browse very fast through different pages and want to select specific links. Still in some cases linky could be useful.
    – ayckoster
    Sep 18, 2011 at 13:50
0

AutoHotkey is certainly your best bet for resolving this most elegantly. I too copy link addresses quite frequently, but have become accustomed to the following solution:

  1. Alt + D (brings cursor focus to address bar in IE, Firefox, even Windows Explorer - likely Chrome)
  2. Ctrl + C
0

Try Ctrl+E on chrome when you right-click on a link.

1
  • 2
    Welcome to Super User! Please read the question again carefully. Your answer does not answer the original question.
    – DavidPostill
    May 23, 2016 at 9:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .