Here is a small C program I wrote some years ago: Clictap. It’s very convenient and I’m still using it to watch my movies.
It makes use of Xlib and Xtest libraries to replace your mouse buttons by keyboard keys.
I made a small Debian package a few days ago:
soon included in the official repositories ?
Configuration file example including profiles for totem, xmms, rhythmbox and mplayer:
# ClicTap configuration file # You can copy this example to ~/.clictap.conf # When this key is pressed, Clictap will ungrab your mouse and quit # Examples : # quit_key q # quit_key ctrl+q quit_key q # Profile used by default default_profile mplayer # List of profiles # For each profile, a set of buttons to keys translations is given, # each translation on a separate line. # For a translation, the first field is the set of buttons, # the second is the set of keys. # Buttons are specified by their numbers. # Keys are specified by their KeySym (Key Symbols). # To know the button numbers and KeySyms, use the xev program to test X events. # Example : # # profile foo # 1 a # 2 b+c # 3+1 space # 3+2 Control_L+d profile totem 1 b 2 p 3 n 4 Up 5 Down profile xmms 1 w 2 c 3 b 4 Up 5 Down profile rhythmbox 1 Alt_L+Left 2 Control_L+space 3 Alt_L+Right 4 Control_L+Up 5 Control_L+Down profile mplayer 1 Left 2 space 3 Right 4 asterisk 5 KP_Divide profile mplayersub 1 x 2 space 3 z 4 asterisk 5 KP_Divide profile test 1 XF86AudioLowerVolume 2 space 3 z 4 asterisk 5 KP_Divide