These tricks for Windows and Mac use the shortcut-creating AutoHotkey and Quicksilver/AppleScript combo, respectively. Essentially, they'll make it so whenever you hit the Caps Lock key, Chrome will come to the front of you rother windows, open up a new tab, and highlight the address bar, so you can search the web with one keystroke. If Chrome isn't open, it will open it for you.
If you're on Windows, just add this code to your main AutoHotkey script:
Capslock::
SetTitleMatchMode, 2
If WinExist("ahk_class Chrome_WidgetWin_0")
{
WinActivate
WinWaitActive
Send ^t
Send ^l
}
else
{
Run "C:\Users\Whitson Gordon\AppData\Local\Google\Chrome\Application\chrome.exe"
sleep 100
Send ^t
Send ^l
}
return
+Capslock::Capslock
Whitson Gordon
to your own user name in the path to Google Chrome.OS X, unfortuntaely, won't let you maps the Caps Lock key to a specific function alone. However, with a bit of tweaking, we can get it so a simple shortcut like Caps Lock+Space will work just fine. First, create a new AppleScript with this code as the body:
tell application "System Events"
tell application "Google Chrome" to activate
keystroke "t" using command down
keystroke "l" using command down
end tell
Update: If you're a Firefox user, AutoHotkey ninja Platypus Man has already created a tweaked version that works in Firefox. If you're using Firefox on the Mac, just replace
"Google Chrome"
with Firefox
.
No comments:
Post a Comment