You can even do it from within Krita with the Ten Scripts script. Save a Python script like this:
script = """
xsetwacom set "Name of your device" Button 3 "key ctrl z"
xsetwacom set "Name of your device" Button 8 "key e"
xsetwacom set "Name of your device" Button 9 "key shift"
xsetwacom set "Name of your device" Button 1 "key ctrl"
"""
import subprocess
subprocess.run(script, shell=True)
Then go to Tools → Script → Ten Scripts and assign your python script to one of the slots. Then do a new script for a different profile and assign to a different slot.
You can change the keyboard shortcuts via Krita’s usual keyboard settings.
Actually, I’m keeping this setup myself now. Don’t know why I never thought of this. ![]()