Add A “Paste And Go” Hotkey To Google Chrome
If you right-click the address bar in Google Chrome, you’ll get a pop-up menu that contains, among other things, a “Paste and go” option. This handy feature lets you paste a URL from the clipboard and navigate to it in one swift motion. However, Chrome doesn’t have a built-in keyboard shortcut for this feature. So lets add one!
Setting Up
- Download and install AutoHotkey.
- Download the Chrome Paste & Go.ahk script and place it somewhere on your computer. Personally, I have a dedicated folder just for AutoHotkey scripts.
- Double-click on Chrome Paste & Go.ahk. This will install the hotkeys (see below).
- (Optional) Make the script automatically run on Windows start-up.
The Hotkeys
The AutoHotkey script adds two new keyboard shortcuts to Chrome :
- Winkey+V – Paste and go.
- Winkey+Alt+V – Paste and go in a new tab.
If you hit one of the hotkeys when the clipboard contains something other than a valid URL, Chrome will automatically launch Google Search using the pasted text as the search query.
Source Code
These are the contents of Chrome Paste & Go.ahk :
;===========================================
; Google Chrome – Paste And Go Hotkeys
;===========================================
#NoEnv
#SingleInstance force
SetTitleMatchMode RegEx
#IfWinActive ahk_class ^Chrome_.+
#v:: Send !d^v{Enter}
#!v:: Send ^t!d^v{Enter}
#IfWinActive
This script is basically an updated version of an older “Paste and go” script. The old script didn’t work with the latest development version of Chrome (5.0.356.0 dev), so I changed the way it recognizes Google Chrome windows to one that should be more compatible with past and future releases. If it does break, you should be able to fix it fairly easily by replacing “^Chrome_.+” with the window class name that your version of Chrome has.
Side note : As someone who mainly uses the Opera browser, I like to have Ctrl+D as the “Paste and go” hotkey. If you have a similar preference, change the “#v” bit in the script to “^d”.
Related posts :
I tried this and it did not work -rather it just toggled between tabs
It’s been years since this script was written. Unfortunately, it might no longer work with the current version of Chrome.
excellent