Graphic Tablets

Using xsetwacom

Here you will find anything you need to know about Graphics tablet:

What I’m using is:

1
2
apt install xsetwacom
xsetwacom -h

Common usages

1
2
3
$ xsetwacom set <stylus-PID> MapToOutput <display>
$ # the smart version
$ xsetwacom set $(xsetwacom list | grep "stylus" | awk '{print $8}') MapToOutput $(xrandr | grep connected | grep -v dis | awk '{print $1}' | fzf --height 10% --reverse)

Use always the stylus’ PID with:

1
$(xsetwacom list | grep "stylus" | awk '{print $8}')

Choose a connected display with this code:

Note: using fzf as selector.

1
$(xrandr | grep connected | grep -v dis | awk '{print $1}' | fzf --height 10% --reverse)

Change the default buttons behaviour

Notes

  • stylus indexes start from 2 (the first one is when the pen touching the pad)
  • pad indexes stars from 1
1
2
3
$ xsetwacom set 28 Button 2 "key +Control_L z -Control_L"
$ # the smart version
$ xsetwacom set $(xsetwacom list | grep "stylus" | awk '{print $8}') Button 2 "key +Control_L z -Control_L"