A few months ago the trackpad in my work computer stopped working properly. Instead of getting it fixed, I took it as challenge to stop using the mouse entirely. Here are the things I learned and rediscovered.
You can go pretty far without a mouse using a combination of
Shift+Tab and arrow keys.
For web browsers, accessible websites such as Google and Wikipedia have focus states for interactive elements and some even contain
Jump to navigation,
Jump to main content tab-accessible links as the very first things you can tab-navigate to.
End can be used to scroll through web pages and PDF documents. To follow text links, press
Ctrl+F, type part of the link text until it matches, press
Esc and your link will be focused. Then just press
Enter. This can also come in handy for image links and forms: search for a term close to the image or element you want to click or focus on then tab-navigate to it.
For GUI applications in general, on Windows and Linux pressing
Alt on will open and/or focus on the applications menu bars. You can then navigate using the arrow keys and pressing the underlined letters in the menu bar items. Good for discovering keyboard shortcuts, too.
With the Vimium extension installed, pressing
f will make every visible link on the page get a one-to-three letter shortcut. Type that shortcut, navigate to that page.
Besides being faster than tab-based navigation, it can be useful during pair-programming sessions: press
f and your coworker can simply say out loud the letter sequence of the link he wants you to navigate to.
Not all applications support a good keyboard-only experience. No problem. While controlling a virtual keyboard with a mouse is hardly joyful, controlling the cursor with your keyboard makes you look pretty cool.
4862 keys are for moving left, up, right and down respectively.
7913 move diagonally.
To set this up on a Linux with Xorg, run
setxkbmap -option keypad:pointerkeys in a terminal then press
Shift + Num Lock to make your numeric keypad control the cursor. For more details, check out the LinuxReviews wiki.
On Windows, as things are always changing in the Control Panel World, refer to the Windows documentation.
You select a piece of the screen. The screen is initially wholely selected. One move will cut that region by half. A move is a direction: up, down, left, and right.
Once you’re done moving, you simply indicate (with a key stroke) that you want to move. Boom, cursor moves.
In practice, this is done by starting the keynav process, pressing
Ctrl-; to pop up an overlay and then repeatedly pressing either
hjkl for dividing up the screen,
w for moving the cursor to the center of the selection area and
3 for left, middle or right clicking.
Sounds crazy, works pretty well.
Besides being potentially much faster than numpad navigation, Vimium on a Raspberry Pi can take a few seconds to set up all shortcuts depending on how busy a web page is. keynav feedback is always instantaneous.
This blog post contains toy implementations of Vimium and keynav.
; opens the keynav overlay. Bisect with
hjkl, click a link with
; again to recenter. Press
q to cancel.
f opens the Vimium overlay. Press the key for the link to navigate or
q to cancel.
As of August 2021, I have been using Vimium for seven years and keynav for six months. I don't miss having a mouse or trackpad!