Script for handling Huion wh1409 buttons
In buttons.py
change path to your device, and commands for button.
Then make the script run at startup
use evtest in console:
sudo evtest
You will see all your input devices like "path deviceName". If you don't sure what is your device write number and try to use buttons on the device then you will see info about pressed button (time when button was pressed, type, code, and value).
sudo pip3 install evdev
To view device properties run:
xinput --list-props "PenTablet Pen"
If you have two or more monitors and want to confine the stylus to one screen you can use the Coordinate Transformation Matrix to accomplish that. For example with two monitors of the same size side by side you would use:
xinput set-prop "device name" --type=float "Coordinate Transformation Matrix" 0.5 0 0 0 1 0 0 0 1
xinput set-prop "device name" --type=float "Coordinate Transformation Matrix" 0.5 0 0.5 0 1 0 0 0 1
defaul value:
Coordinate Transformation Matrix (156): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
For more information about graphics tablet setup see https://digimend.github.io/support/howto/drivers/evdev/ And where you can try to find drivers for your graphics tablet