Loading...

Rotate and Swap Linux touch input

Home/Rotate and Swap Linux touch input

Rotate and Swap Linux touch input

If you are using a Linux operating system which doesn’t support DISPLAX Connect, you may need to rotate or swap the X and Y coordinates (for example: Raspbian, Ubuntu Mate or Raspberry PI 3).

To do this just follow these steps:

Determine the input device name:

xinput list

In this example,the DISPLAX Touch Controller name will be “DISPLAX SKIN FIT (3d7be8aa9506c43779d)”

To perform the rotation select one of the following options:

# Left (rotate clockwise 90º)

xinput set-prop ‘DISPLAX SKIN FIT (3d7be8aa9506c43779d)’ ‘Coordinate Transformation Matrix’ 0 -1 1 1 0 0 0 0 1

# Inverted

xinput set-prop ‘DISPLAX SKIN FIT (3d7be8aa9506c43779d)’ ‘Coordinate Transformation Matrix’ -1 0 1 0 -1 1 0 0 1

# Right (rotate counterclockwise 90º)

xinput set-prop ‘DISPLAX SKIN FIT (3d7be8aa9506c43779d)’ ‘Coordinate Transformation Matrix’ 0 1 0 -1 0 1 0 0 1

Please note:
A routine needs to be set to run one of the above commands (if needed) every time the system is started up, or the rotation setting will be lost.