A | B | C | D | E | F | G | H | I | J | |
---|---|---|---|---|---|---|---|---|---|---|
1 | To use this, make a copy (File->Make a Copy in the sheets menu) and edit the values | |||||||||
2 | Total Screen Width | 2720 | ← change these | |||||||
3 | Total Screen Height | 1280 | ← change these | |||||||
4 | Touchable Width | 1920 | ← change these | |||||||
5 | Touchable Height | 1080 | ← 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.70588 | 0.00000 | 0.00000 | ||||||
15 | [ 0 c2 c3 ] → | 0.00000 | 0.84375 | 0.00000 | ||||||
16 | [ 0 0 1 ] → | 0.00000 | 0.00000 | 1.00000 | ||||||
17 | ||||||||||
18 | ||||||||||
19 | which is represented as a row-by-row array: | C0 | C1 | C2 | C3 | |||||
20 | c0 0 c1 0 c2 c3 0 0 1 | 0.70588 | 0.00000 | 0.00000 | 0.00000 | 0.84375 | 0.00000 | 0.00000 | 0.00000 | 1.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 |