This is a continuation of this thread, but I think it could be useful for
other Trisquel users.
This is a guide to replacing your mouse with the keyboard. It should work
everywhere except for illustration work, for which I recommend you continue
using the mouse.
If you have a number pad, you can skip all these instructions and use
MouseKeys. Go to System Settings → Universal Access → "Pointing and
Clicking" tab and switch MouseKeys to "On".
If you don't have a number pad, as on my laptop, you'll have to do a little
more work. Read on.
First, install the packages keynav and xdotool. You can do this with the
terminal or Synaptic package manager.
Next, add keynav to your list of startup applications. Go to System Settings
→ Startup Applications and add a new entry with "keynav" in the "command"
field and whatever you want in the "name" and "comment" fields. You may want
to reboot your computer at this point, although you can also open a terminal
and run keynav.
keynav will take care of moving the cursor and clicking. Although it claims
to be customizable to other functions, I haven't been able to make it do
anything different from the defaults through editing its configuration file.
To start it, press Control+Semicolon (;). A red 2 × 2 grid should appear on
the screen. Use the arrow keys to move the centre of the grid to where you
want to click, and press Enter to click. You can also press Semicolon again
to move the cursor to the centre of the grid. If you make a mistake, you can
press Control+Arrow key to move the whole grid.
keynav doesn't allow you to right-click, and the right-click key on your
keyboard (which should be between the right Control and Alt) doesn't always
work properly. So we'll need to do a few more hacks, which is where xdotool
comes in.
Go to System Settings → Keyboard → Shortcuts tab → Custom shortcuts
menu option. Create the following six entries with the + button at the bottom
of the window:
Name: Left click; Command: xdotool click 1
Name: Right click; Command: xdotool click 3
Name: Move cursor down; Command: xdotool mousemove_relative 0 10
Name: Move cursor right; Command: xdotool mousemove_relative 10 0
Name: Move cursor up; Command: xdotool mousemove_relative -- 0 -10
Name: Move cursor left; Command: xdotool mousemove_relative -- -10 0
Set the shortcuts to be whatever you like, but be certain they don't conflict
with other shortcuts. I use Super (also known as the Win key)+semicolon to
click, Super+Apostrophe to right-click, and Super+Arrow keys to move the
cursor. You can make the values greater than 10 to make the cursor move more
quickly.
While we're at it, I recommend you assign the shortcut Alt+Super+Delete to
the command "gnome-system-monitor", equivalent to the famous Ctrl-Alt-Delete
on Windows.