Thursday, January 03, 2008

Gmail Edit Link Shortcut Key

I love Gmail. I never have to look at another flashy ad from one of the other webmail providers again. I feel assaulted when my wife and I are browsing together and she is reading her email. I hope Google never changes from their non intrusive, text based ads.

One peeve I have with Gmail is there is no keyboard shortcut to Edit Link. I use Edit Link often when I compose an email. I have gotten used to ctrl+k in MS-Word. IE will open a hyperlink dialog when I use ctrl+k. Firefox uses ctrl+k to set focus on the search bar. I wouldn't mind learning to remember another keyboard shortcut if they would only provide it.

One more thing. It would be great for it to be the same shortcut key that blogger.com and any other editing tool google has (will have).

**** Update 2009-10-14 ****
I was hoping that the new Custom Keyboard Shortcuts would allow me to assign a Ctrl+K some other kind of keyboard shortcut to allow me to bring up the "Edit Link" dialog box when I am composing a message alas no.

4 comments:

laurie said...

Good idea! I'll love to have a Link Shortcut too!

In fact, I found your Blog seaching "gmail link shortcut" in google ;-)

Let's hope gMail hear us :)

Beriukay said...

I know this is long overdue, and maybe you've found something better, but I haven't. So I tried my hand with an Autohotkey script, which can at least get the job done. You will have to change the MouseClick command to suit your needs, and change it every time you adjust your browser.

WinWaitActive, Compose Mail
^k::
MouseClick, left, 390, 383
Sleep, 100


For those who know less about Autohotkey than I do, the WinWait makes sure you are actually actively typing in a window with the title that generally goes along with composing an email. The ^ is used to denote the ctrl key. There are ways to tell your mouse click location, but I used the Script Reader (Writer) that goes along with autohotkey. I'm not sure the Sleep command is strictly necessary.

Beriukay said...

After a bit of work, and help from the forum, I came up with a much better script. It requires a little work, but it isn't hard.

What you need to do is take a screenshot of the link button, and save this image in the same directory as the script you'll be using. It is important to have the image be roughly the same dimensions as the button itself, and to save the file as a .bmp or .png. If you name it anything other than my creatively chosen "link.png", you will have to make that change in the script, too, on the line that says ImageSearch.

Then all you need is to get this script running:


SetTitleMatchMode, 2

;CTRL+K pastes a link into the edit link button in gmail.
;If it can't find the button, it will tell you
#IfWinActive, @gmail.com
^k::
ImageSearch, FoundX, FoundY, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, link.png
If Errorlevel = 0
FoundX := FoundX + 10
FoundY := FoundY + 10
Click %FoundX%, %FoundY%, left
Send, ^v
If Errorlevel = 1
MsgBox Could not find the Link button.

return
#IfWinActive

Mastering said...

Beriukay nailed it with the ImageSearch command in Autohotkey. Note that you'll have to change the image though if you've switched over to the new layout. I also had to modify the IfWinActive field to reflect the Google Apps nature of my gmail account, but after doing this, I found the script to be a sound and reliable way of adding a shortcut key to the create link pop up. Big props to Beriukay for solving a problem Google doesn't seem willing to solve.