Seeing that I refuse to be tied down by the shackles of corded peripherals, I use an Apple Wireless Keyboard and Magic Mouse. Unfortunately we had an issue with our rechargeable batteries this week and I was left without a functioning mouse. Rather than go buy more batteries I decided to try to get by with just my keyboard, which worked out surprisingly well.
Editing
We’ve mentioned it several times before, but we almost exclusively use vim now. It had a bit of a learning curve in the beginning, but substantially sped up my coding and made it a lot easier to transition away from a mouse.
Learning keyboard shortcuts is always worth the time and initial pain. — John Nunemaker
If you’re just starting out, It helps a lot if you pair program with people who
already use vim. If not,
vimtutor can be helpful in
learning the basics. Unbinding the arrow
keys can also
be a huge help with switching to hjkl
, but super annoying the first day or
two. We also highly recommended you bind Caps Lock to Control to save your
fingers some trouble.
Browsing
If you are using vim then odds are you don’t use your mouse for the majority of the day already. If you use Chrome as your default browser you should most definitely be using the Vimium extension, which brings keyboard shortcuts to Chrome in the spirit of vim. (If you’re using Firefox try Vimperator.)
Apart from the obvious scrolling, history and tab shortcuts is the incredibly
useful link hints mode. Hitting f
in command mode labels each visible link
with a set of letters, which can be pressed to follow the link. There’s also
commands for opening one or multiple in new tabs. (Press ?
after installing to
see all the commands.)
Note that you’ll probably want to disable Vimium on sites that already have keyboard shortcuts, such as GMail.
Organizing Windows
It’d be pretty annoying not having a mouse if you couldn’t move windows around with the keyboard. There are several applications that assist with this, but my personal favorite is Divvy. You can achieve the same movements as most other applications, but get the advantage of being able to define your own positions as well as custom shortcuts. If you’re on BSD/Linux check out xmonad.
If you spend your day between terminal and vim, tmux is a good way to combine them into a single screen. It’s also great for remote pairing.
Opening Applications, Files and Folders
I have my dock hidden and at the smallest size possible, since it’s not easy to completely remove it. OS X comes with Spotlight built-in, but tools like Quicksilver and Alfred are substantially faster and allow for much more complex commands.
On the rare occasion when I need to use Finder, Joe Ferris informed me that you can open files and folders with ⌘+↓ and go up a directory with ⌘+↑.
Caveats
By default OS X only allows you to tab between text boxes and lists, which is
not that helpful. You can change this to all controls in the Keyboard
preferences, or by pressing Control+F7
.
There are still occasionally dialogs or other functions that can’t be access via keyboard, especially in third-party applications. For these rare cases I’ve been using my laptop trackpad. If your mouse is still working try leaving it just far enough away to make it annoying to use unless you really need it.
What applications do you recommend to make it easier to stop using the mouse?