How do I set a Wacom button to call a script? eg xsetwacom --set "pad" Button 2 "~/path/to/script.sh"

Manjaro linux 4.4.15-3


According to the documentation, you can only configure a button to emit a keychord event, a mouse button event, or some tablet control functions. So to make a tablet button call a script, you'll need to do it in two steps: configure the button to simulate a keypress, and configure that keypress to call a script. Of course the keypress doesn't have to be a key that you have on your keyboard.

You can use F13, F14, etc. as key names, or use any valid X keysym — for example, if your script starts a mail reader, use XF86Mail.

To bind a key to a command, you can use your desktop environment or window manager's keyboard shortcut functionality, or xbindkeys if you prefer a WM-agnostic method. For example, put this in your GUI session startup:

xsetwacom set pad button2 "cire key F13"

and this in your ~/.xbindkeysrc:

"~/path/to/script &"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.