How To Turn Caps Lock Into A Search Key On Your Mac, Redux

Mac OS X: Some people like the idea of turning their Caps Lock into a search key like on Chrome OS. Weblog Elastic Threads shows us how to do it using a patch for OS X and an application launcher like Quicksilver.

We’ve shown you one way of using your Caps Lock key in conjunction with search before, but it didn’t remap the key entirely, since OS X won’t let you do that. Many of you noted that it is possible, however, with a few other tools. Weblog Elastic Threads laid out pretty easily how to use those tools, so we’ve revamped our method for turning Caps Lock into a search key. Here’s how to set it up. You’ll need:

  • PCKeyboardHack, a patch that lets you remap Caps Lock to another key.
  • KeyRemap4Macbook. This lets you remap that key to a key combo that’s more friendly for other applications, like Quicksilver, to use.
  • An application launcher like Quicksilver or Alfred. For the purposes of this guide, we’ll use QuickSilver, though you should be able to do this in nearly any launcher.

To break OS X’s hold on Caps Lock, open up PCKeyboardHack from System Preferences and under “Caps Lock, Control” check the “Change Caps Lock” box. Under “keycode”, enter 110. This will remap it to the “PC Application Key”, which is a key on many Windows keyboards. It doesn’t exist on Mac keyboards, or even some Windows keyboards.

After that, head into KeyRemap4MacBook (again, from System Preferences) and type “PC application key” in the search box at the top. Scroll down and find a key or key combo that you aren’t using, or don’t need. I chose F9, which by default is mapped to Exposé, which I never launch from the keyboard. Make sure whatever you choose that you disable whatever shortcut it’s already bound to—so, if you choose F9, head into the Exposé preference pane and disable the F9 keyboard shortcut (or map it to something else).

Next, you’ll need to paste the following code into AppleScript Editor and save it somewhere safe on your computer:

tell application “System Events”
tell application “Google Chrome” to activate
keystroke “t” using command down
keystroke “l” using command down
end tell

If you’re using another browser, just replace Google Chrome line with Firefox or whatever browser you’re using. Save the script somewhere safe.

Lastly, open up QuickSilver, go into the menu, and hit Triggers. Add a new trigger with the plus sign and set it to run the script you just saved. Double click on where it says “none” next to Hotkey, and hit the Caps Lock key. You should see your remapped key combination show up in the box, which is good. When you exit Quicksilver, your shortcut should work! Just hit Caps Lock to focus Chrome and open up a new tab ready for searching. If one isn’t open, hitting Caps Lock will start up Chrome for you. Check out the video above for a demonstration on how to set all this up.

Of course, you can adapt this method to make Caps Lock do pretty much anything, but we’re pretty keen on this particular shortcut. If you’ve got your own favourite use, share it in the comments below.

Put Your Mac’s Caps Lock Key to Better Use

The Cheapest NBN 50 Plans

Here are the cheapest plans available for Australia’s most popular NBN speed tier.

At Lifehacker, we independently select and write about stuff we love and think you'll like too. We have affiliate and advertising partnerships, which means we may collect a share of sales or other compensation from the links on this page. BTW – prices are accurate and items in stock at the time of posting.


2 responses to “How To Turn Caps Lock Into A Search Key On Your Mac, Redux”

Leave a Reply