1

I have been trying to get the stylus on my Surface Go 1st generation working with WattOS (Debian 12 based, LXDE) on a left screen rotation. Using:

xrandr -o left

I can get the screen to rotate left. I can also then, using xinput, get the trackpad to act in the new orientation, i.e, stroking left on the touchpad will go up the screen, to the right goes down the screen, up goes right on screen and down goes left on the screen. The command is:

xinput set-prop "Microsoft Surface Type Cover Touchpad" --type=float "Coordinate Transformation Matrix" 0 -1 1 1 0 1 0 0 1

Now I assumed that I could do similar matrix calculations for the stylus but it does not work this way, it seems. According to my calculations, with a screen (as rotated left) of 1200x1800, the stylus should work with

xinput set-prop 'ELAN9038:00 04F3:261A Stylus stylus' --type=float 'Coordinate Transformation Matrix' 1 0 0 0 1 0 0 0 1

What this does is make the cursor appear under the stylus at the centre of the screen but go in odd directions when I move (while hovering to keep the cursor on screen) away - when I move the hovering stylus up, it goes left, down goes right, right goes up and left goes down.

Does anyone know why it is doing this? I have tried inverting the b and d numbers in the a b c d e f g h i configuration as above (as in 1 b 0 d 1 0 0 0 1) but it does not have the desired effect.

ChanganAuto
  • 1
  • 4
  • 18
  • 19

0 Answers0