Showing posts with label firefox. Show all posts
Showing posts with label firefox. Show all posts

Sunday, February 26, 2012

Ending the tyranny of the mouse -- in web browsing

Since I plan to program professionally, I've ramped up my efforts to get by without a mouse, and I thought I'd share some key tools I've used to accomplish this.

For web browsing, the key is Pentadactyl, a Firefox extension that lets you do the things you want from the keyboard. (I would say all the things, but some websites are written so as to be unfriendly to it.) For example, if you want to click on a link, you hit f, and it pops up a keyboard code over every link, and you type the code to "click" on it. Here's what it looks like when you use it:



Other useful features are:
back/forward = shift+H / shift+L
page down/up = space bar / shift+space bar (these work without Pentadactyl)
half page down/up = ctrl + d / ctrl + u
search = / (yes, the slash key), then enter, then n/shift+N to search down/up
go to URL = o, space, [page url] (if you've entered something similar before, you can tab through the cached options)
go to URL in new tab = replace "o" in the above with "t"
open link in new tab: ;t , then it pops up hints as if you had pressed f but opens in a new window

However, you need to configure it a bit in order to get the most out of it. For example, as initially installed, it will remove your ability to use the familiar ctrl +c/v/a (for copy/paste/select all) due to its being based on the text editor Vim. Also, the hint keys (buttons used when creating a code that lets you click a click) are set by default to draw from the numbers 0-9, which are less comfortable to type every time you click on a link, and they are displayed too small to read.

To set your configurations, you need to create/edit a file called ".pentadactylrc" in your home directory. Here are the contents of mine, which fix the above problems:

"1.0rc1

loadplugins '.(js|penta)$'
group user
highlight Hint font: bold 10px "Droid Sans Mono", monospace !important; margin: -.2ex; padding: 0 0 0 1px; outline: 1px solid rgba(0, 0, 0, .5); background: rgba(255, 248, 231, .8); color: black; font-size: 14pt !important;
map -count -modes=i,n,v <C-c> <count><Pass>
map -count -modes=i,n,v <C-v> <count><Pass>
map -count -modes=i,n,v <C-a> <count><Pass>
map -count -modes=i <C-a> <Pass>
map -count -modes=i <C-x> <Pass>
set guioptions=bCrsmT
set hintkeys=asdfwervcxtgq
set hinttimeout=500

" vim: set ft=pentadactyl:


Enjoy your breaking the tyranny of the mouse! (And yes, I composed this entire post, including creating the link, without using the mouse. I may have mentioned that a few times before).

Wednesday, July 23, 2008

A few more giant steps toward giving up my mouse

Many of you may not know I've been in a quest to abandon use of the computer mouse entirely and do everything from the keyboard, as part of my broader goal of improving ease of computer use, which itself is ... nevermind, I'll cut it off right there.

The point is, I've found an absolutely marvelous tool that lets me use the keyboard for a notoriously mouse-intensive task -- web browsing! With this tool, Vimperator (a Firefox plugin and apparently modeled after the Vim text editor, which may or may not have something to do with the "vi" environment), you can "click" on any link just by hitting "f", which brings up a key command for each link on the screen, and then typing that command! While it has many other features (that I'm still slowly learning), that by itself justifies installing it.

In fact, I even created this entire post without using the mouse, and yes, that includes logging in and copying the link from another tab.

With such an amazing tool, how can I criticize it? Like this:

The time for the link key commands to pop up is too long for my taste and makes it not time-competitive with the mouse. (This is probably not easily improvable -- the programmer is no fool!) Also, it doesn't have enough alternate commands to make one-handed use very feasible. (Yes, you just thought of a naughty comment and no, we don't care.) ADDENDUM: oh, and how the link key commands ("hints") don't seem to exploit the letters that already exist in the links (as native alt commands do), plus they overlap the links without any transparency features that let you continue to see the text of the link while the hint is on top.

Still, compared to all that vimperator makes possible, these are tiny nitpicks. Hats off to Herrn Martin Stubenschrott!