Monday, November 23, 2009

Firefox without a mouse

As a developer I have made an habit of using the keyboard for the majority of tasks. Vim for example is my favorite text editor, which does not require point-and-click. This is a productivity requirement: the less my fingers move between the keyboard and the mouse, the faster I am in consulting documentation and other developers' blogs; vim even goes further and lets you scan a document without leaving the home row.

Firefox is also an application where I try to avoid mouse (or touchpad if I am using the EeePC). Unfortunately most sites are not really accessible and I have to resort to mouse for links and forms: it's not satisfying when you [Tab] trough a form and end up in some other place in the page.
Though, Firefox's user interface is really usable without resorting to the mouse. Here are some shortcuts I wanted to share with you:
  • <Ctrl>T: create a new, empty tab, and give it focus.
  • <Ctrl>W: close the currently selected tab.
  • <Ctrl><Shift>T: reopen the last closed tab.
  • <Ctrl>PagUp, <Ctrl>PagDown: move between the opened tab.
  • <Ctrl>L: give focus to the location bar.
  • <Ctrl>K: give focus to the quick search bar. If you set the directive in about:config to true, search queries will be opened in new tabs. Remember that often search engines and websites like and Wikipedia implement the OpenSearch specification, allowing you to add them to the quick search list of engines.
  • <Alt>Down to select the search engine when you are typing in the quick search bar.
For instance, to search the strpos() function on, assuming that you have stored it in the available engines:
<Ctrl>T, <Ctrl>K, <Alt>Down to select, strpos<Enter>
Or, if is set:
<Ctrl>K, <Alt>Down to select, strpos<Enter>
If is already selected since you have already looked for other functions:
<Ctrl>K, strpos<Enter>
Or, given that implements nice urls:
<Ctrl>T, <Ctrl>L, strpos<Enter>

Happy browsing with Firefox and the keyboard! :)


    admirau said...

    You can have one shortcut less (ctrl+K) if you use Alt+Enter in the search box, which opens search results in new tab.

    I also use Alt+D shortcut to reach the location bar.

    Anonymous said...

    One of my coworkers is a big fan of Vimperator, which allows you to use lots of vim key bindings in Firefox. Personally I never could bring myself to use it (even though vim is my preferred code editor), but it may be worth a look if you really want to take this keyboard browsing thing to the next level :)

    Sune Pedersen said...

    If you put a keyword to your search engines eg. "php" for the PHP search engine, you can just go to the locationbar and type "php strpos" in my opinion much faster :)

    Giorgio said...

    Thanks for the additions... I used Firefox for years before finding out there was so many shortcuts and this is valuable information for other readers. :)

    mauro said...

    i use to use F6 to reach location bar. to access search box i do F6+TAB.

    and to close the current tab: ctrl+f4

    i find very useful ctrl+tab and ctrl+shift+tab

    very interesting blog, as always


    Pat Kujawa said...

    FFox has a 'find links' command which is opened by pressing ' (single quote). Once you've found the link by name, just press enter to follow it.

    You can also try the Mouseless Browsing and Cycle Input Focus addons to give you quicker access to links and input boxes.

    Giorgio said...

    Thanks, this is very useful to avoid point and click.

    goose said...

    I learned some new shortcuts tonight. Thanks Giorgio and commenters! :D

    I'd definitely recommend Vimperator if you already use Vim and want to avoid the mouse in Firefox.

    Jani Hartikainen said...

    Not to turn this into a browser flame war, but I'd just like to mention that Opera has very good keyboard navigation shortcuts.

    In addition, it has spatial navigation for moving around on a site with shift+arrow keys, which I haven't seen in any other browser yet.

    In my experience, browsing with just the keyboard is more difficult on other browsers than Opera (and Lynx for obvious reasons ;) )

    Giorgio said...

    I never had the occasion to use Opera since I run only Gnome and it uses Qt (kde libraries)... :)