Lets kill that rat - five steps to keyboard efficiency

18 July 2007

As you know, I like using the terminal where possible, you type what you want and the computer does it. However, on the graphical side, I have become a bit lazy and started to use the mouse too much, moving from keyboard to mouse all the time surely cannot be healthy, and since I work and study using computers in the process, I am keen to avoid the risks of RSI.

So I need to kick my self in the butt to use the keyboard more. What follows is based on a GNOME-based Linux system, but I imagine it is more or less similar on other systems.

1. Remember the four main keys

Most of the time you can guess what to do and it will work. The following four common sense rules are well worth remembering:

  • Escape stops whatever you are doing, equivalent to moving and clicking away on something else with the mouse.
  • Enter usually chooses things.
  • Tab usually moves between things.
  • Cursor keys also tend to move or control elements.

2. Use the slider Luke

The slider is a quick and easy way to do things that would otherwise involve long trips with the mouse. The last one does not actually involve the slider but is a similarly dramatic action.

  • Alt + TAB - brings up the slider to select a program, this one is the key first step to freeing yourself from the rat. Keep holding on to ALT and keep pressing TAB until you have the program that you want.
  • Shift + Alt + TAB - brings up the slider to select a menu panel so you can click on short-cuts or whatever, this is less interesting.
  • Ctrl+Alt+ left/right cursor keys - brings up the slider to move around your workspaces.
  • Ctrl+Alt+d - minimises all the programs, thus giving you the desktop, pressing it again will bring everything back.

3. Alt is your best friend

Alt and the Function keys manage the windows. If you forget one of these, you can use Alt-space to bring up the window bar menu which has most of these listed.

  • Alt+F1 - opens the Gnome menu or whatever we are calling our top menu today.
  • Alt+F2 - allows you to run an application by typing its name.
  • Alt+F4 - closes the window, equivalent to clicking the X in the corner of the window.
  • Alt+F7 - moves the window, use the cursor keys to move the window, pressing other keys returns control back to normal.
  • Alt+F8 - resizes the window, use the cursor keys to move the resize, pressing other keys returns control back to normal.
  • Alt F9 - minimises the window.
  • Alt+F10 - maximises the window.

4. Apple Lisa forever

Now we can do window management using keys, the next step is the programs. The basic key commands for programs go back decades, most people who have been using computers for any length of time will know them. I will list them for completeness but the important thing is not just knowing them but rather the important thing is using them.

F10 Gets you to the main menu of whatever program you are in. Then use the cursor keys to get around. E.g. F10 then down or F10 then right then down. Shift-F10 opens the right-click menu of the program that you are using.

Most programs have at least the Apple Lisa/IBM editing commands, these normally involve the Control Key, for example:

  • Ctrl-S saves the file - the most important command in many programs, do regularly.
  • Ctrl-Z undos the last action.
  • Ctrl X / Ctrl C / Ctrl V - cut, copy, paste.
  • Ctrl F / Ctrl G - find, find next.
  • Ctrl O - opens an existing file.
  • Ctrl W / Ctrl-Shift-W - closes the current file / closes the whole program.

5. Take back the web

Web browsing is what has led to my overuse of the mouse. This is where the low-hanging fruit is and most beneficial to learn as these days most of us use the web more than any single desktop application. I use Epiphany and Firefox, I imagine most other browsers are similar. Most of the normal word- processing/text editing commands from part 4 will work here too. Other commands worth knowing:

  • Ctrl+T gets you a new tab.
  • When you are there, use Alt-home to get your homepage, or Ctrl-l **to type a link into the address bar. **Ctrl-K gets you to the search box in the right hand corner.
  • When you have a lot of tabs open, Alt-1 takes you to the first tab, while Alt-9 takes you to the last tab. Alt-2 through Alt-8 allow you select between the tabs in the centre.
  • Ctrl-W kills a tab, Ctrl-Shift-W or Alt+F4 (as above) to kill the window.
  • Ctr-R is refresh, Alt-cursor left/right can be used to go back to the beginning.

So if I get back into using these I will have reduced my use of the rat significantly. Of course there are things where the rat excels, imaging editing for example, but I find a knowledge of key commands works really helps there too. I use the GIMP imaging editor and knowing which key corresponds to which tool means I can keep the pointer on the image, rather than going back and forth to the menu.

As always if I have missed anything, or if you know a handy key combo, or anything else to share, have your say in the comments.

1 dbr says...

"Lets kill that rat" is the motto/tag-line/etc of a window manager "Ratpoison" - It's kind of like screen for X11 applications (but has better splitting capabilities, being an X11 window manager, rather than a terminal emulator) Everything in ratpoison can be doing via keyboard shortcuts (ctrl+t, c creates a new terminal window, ctrl+t [n/p] flicks though open windows, ctrl+t, ! gives you a temporary terminal box, that you can launch applications from, like firefox-bin) You can still use the mouse to interact with applications, but it's also completely possible to not have to use the mouse at all.

It's also small too (400kb), and requires nearly no configuration to get running - worth a try if you want to use the mouse less - Ben

Posted at 2:23 a.m. on July 18, 2007


2 dbr says...

Err, forgot the URL for ratpoison: http://www.nongnu.org/ratpoison/

Posted at 2:24 a.m. on July 18, 2007


3 Phill says...

In Firefox, you can use Alt + D to focus on the address bar... I prefer that to Ctrl + L because I can type it with one hand!

Posted at 8:12 a.m. on July 18, 2007


4 Zeth says...

@dbr good point! On my old laptop, I used ratpoison exclusively, it would run gnome-terminal and a web browser and that is all I needed really.

@Phill, that's a good one. I'm sure there are many ways to optimise us of the keybindings. I am trying to keep my fingers on the home row and touch type, rather than below the keyboard, which is a hard habit to break, so moving my hand to the mouse less will help in this quest.

Posted at 10:25 a.m. on July 18, 2007


5 Bug says...

  1. It's painful to get to the boxes in order to fill them on websites.

    Also for surfing. It is NOT a joy.

  2. F5 is refresh as well.

  3. F6 can get you to the URL bar as well.

Posted at 5:17 p.m. on July 18, 2007


6 Rolando says...

I prefer using Ion3 (http://modeemi.fi/~tuomov/ion/ ) , instead of ratpoison.

There is also a plugin for Firefox, called Mouseless browsing I think, that give numbers to links and text boxes, so that you don't have to tab your way to them (just type the number in the numpad and press enter). It can seem weird at first though.

Posted at 5:20 p.m. on July 18, 2007


7 anonymous says...

Maybe it's just my firefox, but Alt+Home is the homepage instead of Ctrl+Home.

Generally I do have one hand on the mouse, so two handers like Ctrl+I and Ctrl+K I tend to avoid. So I prefer F6 as well. And F6 and then Tab to go to the search field. Ctrl+T is the limit I can do with one hand, and next to Ctrl+W the most used :-)

Posted at 8:48 p.m. on July 18, 2007


8 Zeth says...

anonymous, You are quite right Alt+Home it is, I have corrected it accordingly.

Posted at 9:11 p.m. on July 18, 2007


9 Ryan says...

There's also Ctrl/Command+Shift+T for Firefox which reopens the tab you last closed. Very important. I'm quite the keyboard freak, and so none of these were new, but this one I've just mentioned was new to me, and it's saved the trouble of having to navigate through the history tab (which isn't so irritating, but wastes time).

Posted at 6:39 a.m. on July 24, 2007


10 Rediscover says...

For browsing, try Conkeror, either the chrome or the xul version http://conkeror.mozdev.org/ Mmm, driving a browser using those emacs keys, like C-v M-v C-u C-n even M-x print<tab> Leave the mouse in the drawer. For a window manager, I switched to WMII then dwm with mitch patches (before was Enlightenment and ratpoison).

Posted at 1:42 a.m. on February 15, 2008


What do you have to say?

Show Editing Help

About

Hello, my name is Zeth, I'll be your host here.

Command Line Warriors is about taking control of your own technology, it looks at our experiences of computing; especially using GNU/Linux, the Python programming language, the command-line and issues such as techno-ethics, best practices and whatever is cool now. If you take control of your technology then you are a Warrior too!

This site is your site too which means that you can contribute and get involved. You can leave comments using the facility provided. For me, the comments and discussions are by far the best part of the site. So please do have your say!

Latest Discussions

Cupcake

July 31, 2010
Good post! You helped me a lot with my school project! CountryField(blank = True) < (K)
Countries in Django

LeshaShampoo

July 30, 2010
it was very interesting to read commandline.org.uk I want to quote your post in my blog. It can? And you et an account on Twitter?
Email Syntax Check in Python

vemma2018

July 30, 2010
I find myself coming to your blog more and more often to the point where my visits are almost daily now!
On Comment Spam

layecenda

July 30, 2010
Hello. And Bye.test :) http://idfjhvihdfiphvlajbvhalibv.com
PuTTY Series: Adding PuTTY to your system path

scuba

July 30, 2010
I’ve been visiting your blog for a while now and I always find a gem in your new posts. Thanks for sharing.
On Comment Spam

Businesking

July 30, 2010
Great site and articles for hack for win, I said Amazing post
How not to program WSGI

Tehnoking

July 30, 2010
This is Great post to learn about the hack Thumbs-up for you :D
How not to program WSGI

Syabiltech

July 30, 2010
I think this articles for master...because very hard to learning, As blogger beginners like me.
How not to program WSGI

coffeeatea

July 30, 2010
Are you looking for coffee gifts? We can tell you more about the coffee gifts including coffee machines and coffee pods.
Introducing Soturi - yet another Django blog application

noni juice

July 30, 2010
I just sent this post to a bunch of my friends as I agree with most of what you’re saying here and the way you’ve presented it is awesome.
On Comment Spam

Dion Moult

July 29, 2010
What I do know is that ever since I tried out Opera and put their tab bar on the left as a column, I've loved that layout. Back on Firefox ...
We need a thoughout integration of the desktop and the web - not Tab Candy superfast jellyfish

ZonaEntertainment

July 29, 2010
Wow useful articles, I'm read to learn about this and now I bookmark this to my Facebook, thanks for share!
How not to program WSGI

Giacomo

July 29, 2010
Honestly, I think both Mozilla and you are wrong :) This sort of concept adds overhead. A user would have to manage all this crap, constantly dragging and dropping, creating ...
We need a thoughout integration of the desktop and the web - not Tab Candy superfast jellyfish

Matija "hook" Šuklje

July 29, 2010
As a minimalist, you'll probybly moan if I mention KDE, but I'll do so anyway ;) The future I want (and actually see slowly fold out before me) is to ...
We need a thoughout integration of the desktop and the web - not Tab Candy superfast jellyfish

tahitian noni

July 28, 2010
Thank You For This Blog, was added to my bookmarks.
On Comment Spam

Rick

July 28, 2010
I already have piles. It's called A New Window.
We need a thoughout integration of the desktop and the web - not Tab Candy superfast jellyfish

Tech News

July 25, 2010
Thanks for this short tutorial...was auto-FTPing my files from my appserver to webserver for my tech news website. Everything was OK until someone hacked it. Hosting provider is now recommending ...
SFTP in Python: Really Simple SSH

naypalm

July 24, 2010
During the past 3-4 years, I and many others have enjoyed unlimited 2G/3G internet. But ever since the massive cult-like following of i Phone users in the US, most cellular ...
Calling time on mobile internet nonsense?

Steve

July 15, 2010
Very occasionally, you will run into a Java program that uses a lot of memory just to hold all the classes used. It turns out that the JVM uses a ...
Three classic command line tips

no

July 14, 2010
1. number one 2. number two 4. number four 3. number three 6. number six # first # second ## second-ay ## second-bee ### second-bee-one ### second-bee-two
An Introduction to ReStructuredText