I had a lot of trouble trying to configure the buttons on my wacom tablet on a manjaro installation.
I ended up using this answer to actually get it working, but it only worked some of the time because the stylus and pen IDs would sometimes change when I plugged the tablet in again.
Here are the contents of the shell script that actually changes the button settings:
#!/usr/bin/env bash
sleep 1
export XAUTHORITY=/home/mashpoe/.Xauthority
export DISPLAY=:0
the IDs will randomly change so the next commands won't work
sets button 3 for the stylus
xsetwacom set 15 Button 3 "key e"
sets each button for the pad
xsetwacom set 16 Button 1 "key +ctrl z -ctrl"
xsetwacom set 16 Button 2 "key +ctrl +shift z -ctrl -shift"
xsetwacom set 16 Button 3 "key +ctrl - -ctrl"
xsetwacom set 16 Button 8 "key +ctrl +shift + -ctrl -shift"