Syamsul 'isul' Arifin

kartunis dan desainer

Fri, Sep 30, 2022

How to Activate Wacom Pad Button on Linux

wacom

To activate Wacom Pad Button on linux, we can use xsetwacom command. But you must have libwacom installed. If you don’t have it, you must install it. My wacom device will be an example. Below is the way.

  1. Get the device detail.
xsetwacom list

you will get result like this..

wacom

Now We have the pad detail, “Wacom Intuos S 2 Pad pad”.

  1. Get the pad button with syntaxt
xsetwacom -s get <device> parameter

With the example, the command will be like this…

xsetwacom -s get "Wacom Intuos S 2 Pad pad" all

Now we can see, there are 5 buttons which are used by wacom pad.

wacom

According to my wacom pad, we need just only 4 button. Look at the picture below.

wacom

  1. Now we will find out which the 4 buttons really used by my wacom pad. How? You can use this command…
xsetwacom set "Wacom Intuos S 2 Pad pad" "Button" "1" "key 1 " 
xsetwacom set "Wacom Intuos S 2 Pad pad" "Button" "2" "key 2 " 
xsetwacom set "Wacom Intuos S 2 Pad pad" "Button" "3" "key 3 " 
xsetwacom set "Wacom Intuos S 2 Pad pad" "Button" "8" "key 8 " 
xsetwacom set "Wacom Intuos S 2 Pad pad" "Button" "9" "key 9 "

Open a text editor then click pad buttons. We will know the 4 buttons are.

  1. Lets’s say we knew already the 4 buttons that really used by the wacom pad. For example… button 1, button 3, button 8, and button 9. Now we can modified each button.
  • Button 1. We want button for a shortcut “ctrl +” (zoom in shortcut on Krita). We can use command…
xsetwacom set "Wacom Intuos S 2 Pad pad" "Button" "1" "key ctrl shift = " 
  • Button 3 for shortcut “ctrl -” (zoom out shortcut on Krita).
xsetwacom set "Wacom Intuos S 2 Pad pad" "Button" "3" "key ctrl - " 
  • Button 8 for shortcut “ctrl [” (rotate canvas left shortcut on Krita).
xsetwacom set "Wacom Intuos S 2 Pad pad" "Button" "8" "key ctrl [ " 
  • Button 9 for shortcut “ctrl ]” (rotate canvas right shortcut on Krita).
xsetwacom set "Wacom Intuos S 2 Pad pad" "Button" "9" "key ctrl ] " 

Pad Buttons active on start up

  1. Make a bash file. For example, “.xsetwacom.sh” which contain 4 buttons command above. for example…
#! /bin/bash
xsetwacom set "Wacom Intuos S 2 Pad pad" "Button" "1" "key ctrl shift = " 
xsetwacom set "Wacom Intuos S 2 Pad pad" "Button" "3" "key ctrl - " 
xsetwacom set "Wacom Intuos S 2 Pad pad" "Button" "8" "key ctrl [ " 
xsetwacom set "Wacom Intuos S 2 Pad pad" "Button" "9" "key ctrl ] " 

Dont forget to give the file “execute” permission.

  1. Place on your startup application command …
~/.xsetwacom.sh

or you make a startup script for example “xsetwacom-startup.desktop”

[Desktop Entry]
Encoding=UTF-8
Name=Xsetwacom
Type=Application
Exec=~/.xsetwacom.sh

And put the file in autostart folder. Sometimes the path autostart folder is “~/.config/autostart” (Fedora LXQT).

comments powered by Disqus