ABCDEFGHIJ
1
To use this, make a copy (File->Make a Copy in the sheets menu) and edit the values
2
Total Screen Width2720← change these
3
Total Screen Height1280← change these
4
Touchable Width1920← change these
5
Touchable Height1080← change these
6
Name of my input device ('xinput --list' gives you this value)
Advanced Silicon S.A CoolTouch(TM) System← change these
7
8
c0 = touch_area_width / total_width calculated based on above
9
c1 = touch_area_x_offset / total_width 0
Zero offset for me since my touch monitor is the first one. Change this to the OFFSET value if you need to.
10
c2 = touch_area_height / total_height calculated based on above
11
c3 = touch_area_y_offset / total_height 0
Zero offset for me since my touch monitor is the first one. Change this to the OFFSET value if you need to.
12
13
Transformation Matrix
14
[ c0 0 c1 ] →0.705880.000000.00000
15
[ 0 c2 c3 ] →0.000000.843750.00000
16
[ 0 0 1 ] →0.000000.000001.00000
17
18
19
which is represented as a row-by-row array: C0C1C2C3
20
c0 0 c1 0 c2 c3 0 0 10.705880.000000.000000.000000.843750.000000.000000.000001.00000
21
22
Paste in this xinput command
xinput set-prop 'Advanced Silicon S.A CoolTouch(TM) System' --type=float 'Coordinate Transformation Matrix' 0.705882352941177 0 0 0 0.84375 0 0 0 1
23
Thanks to the arch linux guys: https://wiki.archlinux.org/index.php/Calibrating_Touchscreen#Calculate_the_Coordinate_Transformation_Matrix