Section "InputClass"
        Identifier "calibration"
        MatchProduct "ADS7846 Touchscreen"

        # Depends on: xserver-xorg-input-evdev
        Driver "evdev"
        Option "MinX" "6263"
        Option "MaxX" "62651"
        Option "MinY" "3686"
        Option "MaxY" "61576"
        Option "SwapXY"  "0"
        Option "InvertX" "0"
        Option "InvertY" "0"

		# LibInput uses matrix transformation (Touch coordinates multiplied by this values to get screen coordinates)
        # Matrix (by 3 points)
        # X1 X2 X3
        # Y1 Y2 Y3
        # Z1 Z2 Z3 (Pressure/not used)

        # Apply (temporaty):
        # xinput set-prop "ADS7846 Touchscreen" 'Coordinate Transformation Matrix' 0 1 0 1 0 0 0 0 1
        
        #Driver "libinput"
        #Option "CalibrationMatrix" "1 0 0 0 1 0 0 0 1" # Rotate 0 (default)
        #Option "CalibrationMatrix" "-1 0 1 0 1 0 0 0 1" # Rotate 0, invert X
        #Option "CalibrationMatrix" "1 0 0 0 -1 1 0 0 1" # Rotate 0, invert Y
        #Option "CalibrationMatrix" "0 1 0 1 0 0 0 0 1" # Rotate 0, swap X-Y
        #Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1" # Rotate 90
        #Option "CalibrationMatrix" "1 0 1 0 -1 1 0 0 1" # Rotate 180
        #Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1" # Rotate 270
        #Option "CalibrationMatrix" "0 -1 1 -1 0 1 0 0 1" # Rotate 270, invert Y

	Option "EmulateThirdButton"              "1"
	Option "EmulateThirdButtonTimeout"       "500"
	Option "EmulateThirdButtonMoveThreshold" "100"
EndSection
