The problem is subtle. You want a way to clear the contents of a text field without selecting the contents first, because selecting them will clobber your selection buffer's contents. In my opinion, this is a design flaw in whatever UI toolkits are used on Linux. Only manually selected text should be copied to the X primary selection, not text that is selected incidentally as a result of a non-text-selecting operation (e.g. clicking in a text field). But anyway, how about a couple of workarounds?
If you don't mind adding extra toolbar buttons, you can try the pastego extension: But I'm not sure it works with the X selection.
Another option is to install one of the many extensions that add clear buttons to the location/search bars, such as Clear Fields, DiggiDig, ClearURLButton, or xclear. Then, you just hit the clear button, and the text field is empty, ready for you to middle-click your own text into it.
Lastly, you can try clickngo, which does more or less exactly what you want, and seems to work in FF 3.5, despite the lack of a recent version bump.
Edit: I just remembered a command-line solution to this problem: surfraw. Here's the beginning of the package description:
Surfraw provides a fast unix command line interface to a variety of
popular WWW search engines and other artifacts of power. It reclaims
google, altavista, dejanews, freshmeat, research index, slashdot
and many others from the false-prophet, pox-infested heathen lands of
html-forms, placing these wonders where they belong, deep in unix
heartland, as god loving extensions to the shell.
Basically, it lets to do google (and other) searches from the command line.
In FireFox, in your address bar type
about:config
and press Enter. Now look for an entry that's titled "keyword.URL
", this is the config key that contains which search URL to use when you search through your address bar. If you double click the entry, you can change the value.
By default it should be set to google, which uses this query URL: http://www.google.com/search?&q=
It's possible it's a bit different but it should be similar.
Some examples for search engines' query URLs:
Google: http://www.google.com/search?&q=
Yahoo: http://search.yahoo.com/search?p=
Ask: http://www.ask.com/web?q=
Bing: http://www.bing.com/search?q=1
If you want an other search engine, and don't know the query URL, do the following:
Go to your preferred search engine (E.g. Google)
Perform a search with an easily recognisable keyword like "HELLOWORLD"
In your address bar, there should be an URL containing your keyword. For Google it would be something like http://www.google.nl/search?q=HELLOWORLD&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:nl:official&client=firefox-a
Now just delete everything after the "=
" that's just before your chosen keyword. Your query URL for Google would be: http://www.google.nl/search?q=
Best Answer
The addon Searchload options does this.