Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Under Keyboard Shortcuts : Application Shortcuts I've already tried with either "Search With Google" or "Google Search..." as the Menu Item (both of these for Application set as Google Chrome, of course).

Also, even with Chrome as the default browser, the Search With Google (under Services : Searching; which works) always uses Safari.

In short, how do you set up a keyboard shortcut to avoid right-clicking the selected word and choosing Search Google for 'the selected word' from the right-click menu?

Thank you.

share|improve this question
up vote 42 down vote accepted

The Search With Google service is provided by Safari, and it is not meant to work with other browsers.

You can create another service yourself though:

  1. Open Automator and choose the Service template
  2. Add a Run Shell Script action for a script like open "$(ruby -rcgi -e 'print CGI.escape $<.read.chomp')"
  3. Save the service and assign it a shortcut from System Preferences

share|improve this answer
Lri, this is great; it works! Now, would you care to explain how approximately it works? It invokes bash, then ... what does ruby -e 'require "cgi"; print CGI.escape($<.read.chomp)' do? I presume this returns back to Chrome? – Blaz Dec 21 '11 at 9:49
@courteous The ruby command reads the string you searched for and URL-escapes it. The result of this is evaluated by $() and just appended to the line by bash. – slhck Dec 21 '11 at 14:17
@slhck, thank you for the clarification. I'd up-vote if only I could. – Blaz Dec 24 '11 at 19:21
@Lri THANKS FOR THAT! If somebody would like to have easy google translator access under right mouse button on OS X – andi Nov 8 '13 at 11:12
You can also remove the stock one by finding if accord to the instructions at… – Joel Mellon Aug 26 '14 at 22:33

You must log in to answer this question.

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