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.
<p>"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.</p>
<p>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</p>
<p>Err, forgot the URL for ratpoison:
<a class="reference external" href="http://www.nongnu.org/ratpoison/">http://www.nongnu.org/ratpoison/</a></p>
<p>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!</p>
<p>@dbr good point! On <a class="reference external" href="http://commandline.org.uk/2006/an-ode-to-the-fujitsu-lifebook-270dx/">my old laptop</a>, <a class="reference external" href="http://commandline.org.uk/2006/kill-the-rodent-with-ratpoison/">I used ratpoison</a> exclusively, it
would run gnome-terminal and a web browser and that is all I needed really.</p>
<p>@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.</p>
<ol class="arabic">
<li><dl class="first docutils">
<dt>It's painful to get to the boxes in order to fill them on websites.</dt>
<dd><p class="first last">Also for surfing. It is NOT a joy.</p>
</dd>
</dl>
</li>
<li><p class="first">F5 is refresh as well.</p>
</li>
<li><p class="first">F6 can get you to the URL bar as well.</p>
</li>
</ol>
<p>I prefer using Ion3 (<a class="reference external" href="http://modeemi.fi/~tuomov/ion/">http://modeemi.fi/~tuomov/ion/</a> ) , instead of ratpoison.</p>
<p>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.</p>
<p>Maybe it's just my firefox, but Alt+Home is the homepage instead of
Ctrl+Home.</p>
<p>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 :-)</p>
<p>anonymous, You are quite right Alt+Home it is, I have corrected it
accordingly.</p>
<p>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).</p>
<p>For browsing, try Conkeror, either the chrome or the xul
version
<a class="reference external" href="http://conkeror.mozdev.org/">http://conkeror.mozdev.org/</a>
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).</p>