Skip to main content

Rotate touch on the Official Raspberry Pi Touchscreen Display

Article author
Michael
  • Updated

Some projects require the display and touch to be rotated 90 degrees or other rotations.

Rotating 90 degrees (or others) requires a different line to be added to the config file:

Open the config.txt file by using the following command in a terminal window:

sudo nano /boot/config.txt

Then add the line that best fits your needs:

  • Rotate left 90 = xinput set-prop 'raspberrypi-ts' 'Coordinate Transformation Matrix' 0 -1 1 1 0 0 0 0 1
  • Rotate 180 = xinput set-prop 'raspberrypi-ts' 'Coordinate Transformation Matrix' -1 0 1 0 -1 1 0 0 1
  • Rotate right 90 = xinput set-prop 'raspberrypi-ts' 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1
  • Return to upright = xinput set-prop 'raspberrypi-ts' 'Coordinate Transformation Matrix' 1 0 0 0 1 0 0 0 1
 

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request