If all buttons are detected correctly then you can install btnx:
sudo apt-get install btnx OR
sudo aptitude install btnx
Then go to: Applications -> System Tools -> Btnx
It has support for many types of mice
To fix the middle click you can use the following command:
xinput set-int-prop NN 266 8 2 3 0 0 1 2 3
Where NN is the id of the mousepad device, you can see it with the command xinput list. 266 is the id of the property "Synaptics Tap Action" you can see it with xinput list-props NN. Example:
xinput set-prop "ETPS/2 Elantech Touchpad" "Synaptics Tap Action" 8, 9, 0, 0, 1, 2, 3
You have to run that command after each resume. To preserve your synaptics configuration after resume, you can follow this steps (from wiki.archlinux.org):
Gnome settings daemon may override existing settings (for example ones
set in xorg.conf.d) for which there is no equivalent in any of the
graphical configuration utilities. It is possible to stop gnome from
touching mouse settings at all:
1. Run dconf-editor
2. Edit /org/gnome/settings-daemon/plugins/mouse/
3. Uncheck the active setting
It will now respect your system's existing synaptics configuration.
It worked for me on Ubuntu 11.10 AND now I have:
Middle Click with two fingers tap.
Right Click (tap at bottom right of scroll area).
You can set commands for mouse keys with ccsm.
Open a terminal. (Ctrl+Alt+T)
To install ccsm type:
to start ccsm.
Click on Commands and type in a command. Enable the commands plugin. Now click on Button bindings. There you can set your mouse buttons.
EDIT: Sorry I didn't read that you want to control your mouse with the keyboard :)
I hope this helped you, Daniel