For reference, here is a documentation about xsetwacom: https://www.systutorials.com/docs/linux/man/1-xsetwacom/ (it’s just the man on a convenient webpage).
On the stylus, you should have several buttons but I’m not sure how to get their number so you might have to try things. I think they’re in order, button 1 being the tip and so on.
We’ll start with a simple example. Let’s say that you want your stylus button #2 to press the keys “a” then “b”, you’d run the following command:
xsetwacom set 14 Button 2 "key +a +b"
14 is the id of your Stylus (note that ids can change if you unplug/plug the tablet). At the end is the combination of keys you want to simulate ("+" before a key meaning pressing it and “-” meaning releasing it).
To get the code to use for a specific key, you can check the file /usr/include/X11/keysymdef.h (it’s a text file, you can open it with Pluma: pluma /usr/include/X11/keysymdef.h ; never make changes in it of course, but as long as you don’t run pluma with sudo, you can’t anyway as it’s a system file) or use the xev command and look at the keysim value in its output when you press and release keys (close the small window it opened to quit xev).
So, another example a bit more complex: let’s say that you want the keystroke for you button to be “ctrl shift v”. The left control key has key code 0xffe3 and left shift has key code 0xffe1. The command would be:
xsetwacom set 14 Button 2 "key +0xffe3 +0xffe1 +v"
You can also use the key name (next to the code in the xev output) rather than the number, e.g. left ctrl is Control_L and left shift is Shift_L so the last command can also be:
xsetwacom set 14 Button 2 "key +Control_L +Shift_L +v"
All keys don’t have a name like this so you might have to use the key code anyway for some.
You can reset the button to its original function by setting it again without a keys combination, like this:
xsetwacom set 14 Button 2
Now, you can make some tests (don’t hesitate to ask for more help) and if you succeed in getting the behaviour you want, I’ll explain how to run the commands you need at session start so that you don’t have to retype them every time.
I know this looks a bit complicated but I don’t know another way for MATE to manage a Wacom tablet than using xsetwacom.