Match graphic tablet active area to monitor subarea in a dual monitor setup

multi-monitortabletxinput

I have a graphic tablet with a pen recognized by xinput as UC-LOGIC Tablet WP8060U Pen.

The tablet active area has 4:3 proportions.

I have two monitors: 2560×1440 (16:9) on the left and 1440×900 (16:10) on the right.

I'd like to limit the tablet pen to a 4:3 area centered on the left monitor, therefore a 1920×1440 window with an offset from the left border of 320px.

I have trouble understanding what to use for the commands

xinput set-prop "UC-LOGIC Tablet WP8060U Pen" --type=float "Coordinate Transformation Matrix VALUES HERE"
xinput set-prop "UC-LOGIC Tablet WP8060U Pen" "Evdev Axis Calibration" xmin xmax ymin ymax

Best Answer

Ok, I solved it:

  • the default Evdev Axis Calibration is fine (unplug & plug to delete previous values set by xinput set-prop)
  • the transformation matrix should be

width/tot_width 0 x_offset/tot_width 0 1 0 0 0 1

In my case width is 1920, tot_width = 2560+1440=4000, x_offset=320, therefore the complete command becomes

xinput set-prop "UC-LOGIC Tablet WP8060U Pen" --type=float "Coordinate Transformation Matrix" 0.48 0 0.08 0 1 0 0 0 1

Related Question