Ubuntu – Wacom button and mouse button setting

buttonsettingssoftware installationwacom

I use my Wacom Intuos Pro. And it works very well. I try to use the pad buttons work like the left and right mouse buttons. But I can not. Can anyone help me?

Best Answer

I have a different tablet, but I use this script:

#!/bin/bash 
#
# the darn thing change names if is on wireless or not...
#
device=$(xsetwacom --list | grep -i "pad" |  awk '{print $(NF-2)}')

xsetwacom --set "$device" button 1 "key ctrl z"
xsetwacom --set "$device" button 3 "key shift ctrl s"
xsetwacom --set "$device" button 8 "key shift ctrl l"
echo "Ok --- all set on device $device."

exit 0

It will need a bit of try and error to find the buttons; what I do is normally use a script assigning a letter to each key an clicking in a terminal to check, like

xsetwacom --set "$device" button 1 "key 1"
xsetwacom --set "$device" button 2 "key 2"

... and so on.

The manual of xsetwacom says:

 Button button-number [mapping]
          Set a mapping for the specified button-number. Mappings take the
          form of either a single numeric button or an 'action' to be per‐
          formed. If no  mapping  is  provided,  the  default  mapping  is
          restored.

          Numeric  button  mappings  indicate  what  X11 button number the
          given button-number should correspond to. For example, a mapping
          of  "3" means a press of the given button-number will produce as
          a press of X11 button 3 (i.e. right click).

so to define the buttons 1 and 2 (example out of the blue) to left and right mouse button you should do:

xsetwacom --set "$device" button 1 1
xsetwacom --set "$device" button 2 3

(not tested, I have my tablet at the office).