sudo apt install gnome-shell-extension-draw-on-your-screen
https://extensions.gnome.org/extension/1683/draw-on-you-screen/
xsetwacom --list devices
Output:
Wacom Intuos BT S Pad pad id: 18 type: PAD
Wacom Intuos BT S Pen stylus id: 19 type: STYLUS
Use the full name to make updates.
Wacom Tablet used in this example: Wacom Intuos BT
Wacom Intuos has 4 button (Bluetooth version has a button in the middle for power/bluetooth-related functions) Buttons and key codes can be mapped as:
Physical Button | xsetwacom Button Code |
---|---|
1 | 1 |
2 | 2 |
3 | 3 |
4 | 8 |
# mapping button 1 to start draw on screen mode (alt+super+d)
xsetwacom --set "Wacom Intuos BT S Pad pad" Button 1 key "alt super d"
# mapping button 2 to erase previous drawings draw on screen mode (alt+super+e)
xsetwacom --set "Wacom Intuos BT S Pad pad" Button 2 key "alt super e"
# mapping button 3 to redo command (ctrl+y)
xsetwacom --set "Wacom Intuos BT S Pad pad" Button 3 key "ctrl y"
# mapping button 4 to undo command (ctrl+z)
xsetwacom --set "Wacom Intuos BT S Pad pad" Button 8 key "ctrl z"
https://itectec.com/ubuntu/ubuntu-configuring-wacom-tablet-buttons-and-options/
https://askubuntu.com/questions/729564/wacom-button-and-mouse-button-setting