PDA

View Full Version : [SOLVED] touchscreen rotation to portrait configuration scripts using QUANTA driver



yerb
May 3rd, 2012, 07:50 PM
Hi all.

I wanted to rotate touchscreen monitor (IIYAMA T2250MTS) to portrait mode but coordinates for cursor were still working in landscape mode. I have searched for exact answer but it was hard to find.

So, here it is:

Make the .sh scripts and run them. They will change the display rotation and set the proper cursor coordinates.

First list all input devices in terminal (ctrl+alt+t):

xinput -listit should list something like this:

⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ PIXART USB OPTICAL MOUSE id=10 [slave pointer (2)]
⎜ ↳ QUANTA OpticalTouchScreen id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Sleep Button id=7 [slave keyboard (3)]
↳ Chicony USB Keyboard id=8 [slave keyboard (3)]
↳ Chicony USB Keyboard id=9 [slave keyboard (3)]then make .sh scripts using gedit:

for landscape:

#!/bin/sh

#landscape (normal)

xrandr -o normal
xinput set-prop "QUANTA OpticalTouchScreen" --type=float "Coordinate Transformation Matrix" 0 0 0 0 0 0 0 0 0for portrait (left rotation):

#!/bin/sh

#portrait (left)

xrandr -o left
xinput set-prop "QUANTA OpticalTouchScreen" --type=float "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1Don't forget to set chmod to execute for .sh files:

chmod 777 *.shRun them like this:

./portrait.shenjoy!