doc: Fix mistake in Matrix example to relect only X along Y axis
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Fri, 16 Jun 2017 23:13:28 +0000 (01:13 +0200)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 20 Jun 2017 06:43:49 +0000 (16:43 +1000)
On some devices, X coordinate is not working well, like if it is swapped:
click on right, pointer appear on left and vice versa.

To sort this issue, coordinates should be reflected on Y axis:
- new X position is changed (width is subtracted by X position)
- Y is unchanged (it was wrongly set to X)

In landscape (or portrait) mode:

                [  x  ]
                [  y  ]
                [  1  ]
              *    =
  [ -1 0 1  ]   [  x' ] = -x + 0*y + 1*width
  [  0 1 0  ]   [  y' ] = 0*x + 1*y + 0*height
  [  0 0 1  ]   [  1  ]

This was verified using this touch screen (usb="0eef:0001")

  E: ID_VENDOR=eGalax_Inc.
  E: ID_VENDOR_ENC=eGalax\x20Inc.
  E: ID_VENDOR_ID=0eef

https://bugs.freedesktop.org/show_bug.cgi?id=101474

Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
doc/device-configuration-via-udev.dox

index cacbbf1a421f0b26739ec3f93894f64317c2cb41..4faab93a2c1794d203c95e0aa59a10872f26e8a7 100644 (file)
@@ -24,7 +24,7 @@ Example values are:
  ENV{LIBINPUT_CALIBRATION_MATRIX}="0 -1 1 1 0 0" # 90 degree clockwise
  ENV{LIBINPUT_CALIBRATION_MATRIX}="-1 0 1 0 -1 1" # 180 degree clockwise
  ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1" # 270 degree clockwise
- ENV{LIBINPUT_CALIBRATION_MATRIX}="-1 0 1 1 0 0" # reflect along y axis
+ ENV{LIBINPUT_CALIBRATION_MATRIX}="-1 0 1 0 1 0" # reflect along y axis
 @endcode
 </dd>
 <dt>LIBINPUT_DEVICE_GROUP</dt>