I have an Microsoft Sidewinder X8 mouse and I wish to use 8 for Shift and the 9 for Control. Can anybody please tell me how?
|
First install xdotool
Then, you can create a script to simulate a Ctrl key press. Open gedit and copy paste the following:
I'm not a great bash programmer. I need to search a way to identify if your button is down and I may have (more than one) syntax errors but I guess a bash programmer gets the idea. If someone fixed the script, save it under ctrl.sh and make it executable
Then, as nathwill said, go to system -> preferences -> keyboard. Add a custom command, choose to add the ~/ctrl.sh command and press your mouse button as shortkey. This should do it. |
||||
|
|
http://linux.derkeiler.com/Newsgroups/comp.os.linux.x/2003-07/0010.html explains how to accomplish this using xbindkeys and xmacroplay (from the xmacro package). Both of these applications are available from the Ubuntu repositories. Here is an example from the site that explains how to map mouse button 6 to the Alt + Left key combination.
There is Shift_L and Control_L (as well as Shift_R and Control_R if you prefer the right versions of the keys instead of the left versions). Simply substitute these keys into the above command, change b:6 to be the actual mouse button you want to map to the key, and put the command in |
||||
|
|
Install xdotools and xbindkeys
Then copy the following code into ~/.xbindkeysrc
where b:x is the number of your button which you can find out using xev.
As I don't want this bindig permanent everytime I need it I start a terminal and type |
|||
|
|
|
System → Preferences → Keyboard shortcuts lets you map keys/buttons to commands; if that doesn't work |
||||
|