Results 1 to 1 of 1

Thread: touchscreen rotation to portrait configuration scripts using QUANTA driver

Threaded View

  1. #1
    Join Date
    May 2012
    Beans
    1

    touchscreen rotation to portrait configuration scripts using QUANTA driver

    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):
    Code:
    xinput -list
    it should list something like this:
    Code:
    ⎡ 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:
    Code:
    #!/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 0
    for portrait (left rotation):
    Code:
    #!/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 1
    Don't forget to set chmod to execute for .sh files:
    Code:
    chmod 777 *.sh
    Run them like this:
    Code:
    ./portrait.sh
    enjoy!
    Last edited by yerb; May 3rd, 2012 at 08:04 PM. Reason: details

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •