Here's a short overview of what I used to set up my Wacom tablet in Ubuntu. (cfr. also this blog post of mine on setting up a Wacom tablet in Ubuntu).
1. Device names
xsetwacom --list devices
gives you the names of your devices.
In my case the result is:
Wacom Intuos Pro M Pen stylus id: 14 type: STYLUS
Wacom Intuos Pro M Pen eraser id: 15 type: ERASER
Wacom Intuos Pro M Pen cursor id: 16 type: CURSOR
Wacom Intuos Pro M Pen pad id: 17 type: PAD
Wacom Intuos Pro M Finger touch id: 18 type: TOUCH
2. Parameters
xsetwacom --list parameters
gives you a long list of parameters you can use, with a brief explanation of what they mean. The parameter "Button" for instance will be used to assign a key to a button (or "express key" as Wacom calls it).
3. Modifiers
xsetwacom --list modifiers
gives you the list of modifiers (keys really) you can set the parameters to. The modifier "PgDn" for instance will be used to set a button ("express key") to act as if you press the "PageDown" button on your keyboard.
4. Mapping buttons
With this knowledge, you can construct the following type of commands:
xsetwacom set "Wacom Intuos Pro M Pen pad" Button 2 key "b"
The above example would set "button 2" to the key "b".
You can find the numbers of the buttons as follows.
The mappings for all supported tablets can be found in the /usr/share/libwacom/ directory. There are text files in the main directory that use a *.tablet extension naming convention. The buttons for the Intuos Pro are designated with alphabetical labels where A=Button 1, B=Button 2, etc.
The subdirectory located in /usr/share/libwacom/layouts/ contains vector image files that display a graphical depictions of the tablets and the button assignments. These *.svg files should be opened with Inkscape or another application capable of displaying scalable vector graphics files.
Note that these commands will have to be entered at every new login.
More info on xsetwacom on the linuxwacom wiki.
I understand your frustration, but this problem can be solved very simple with the help of xinput
tool.
First plug in your USB mouse, then run the following command:
xinput list
to see the id
of your mouse. The output of above command it can be similar to:
xinput | cat
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=14 [slave pointer (2)]
⎜ ↳ USB Mouse id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
...
In the above example the USB mouse has id=11
. We will use this id
in the following command which will swap buttons to be left handed only for the USB mouse (and not for tauchpad):
xinput set-button-map 11 3 2 1
In general:
xinput set-button-map id 3 2 1
To revert the change, use:
xinput set-button-map id 1 2 3
To make the change permanently, add the following command at Startup Applications (search in Dash for Startup Applications):
sh -c "xinput set-button-map id 3 2 1"
Update:
Since the id might change after reboot but the name of the USBmouse not, you could also grep for the name of the mouse and apply it. To skip the details reg. picking out the name the final solution looks like:
for id in `/usr/bin/xinput list | /bin/grep 'USB Mouse' | /bin/grep -o [0-9][0-9]`; do xinput set-button-map $id 3 2 1; done;
pack it into the above mentioned Startup Applications you'll get finally:
sh -c "for id in `/usr/bin/xinput list | /bin/grep 'USB Mouse' | /bin/grep -o [0-9][0-9]`; do xinput set-button-map $id 3 2 1; done;"
Best Answer
I had the same issue, but I found the solution.
After you switch to left handed button (in preferences > mouse) you must execute this in the terminal to map the touchpad taps correctly
Now just program those lines to execute this every time Lubuntu starts.