Results 1 to 10 of 51

Thread: Rotate mouse/cursor axes

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Beans
    Hidden!

    Red face Rotate mouse/cursor axes

    I've just discovered the magic of screen rotation and xrandr. My laptop (Asus S5n) is small enough that I can hold it like a book, and subsequently i can read pdf's as if i was reading book. However, it is a little annoying that my touchpad control doesn't change. Holding in book position, "up" on the touchpad translates to "right" on the screen. Is there any way to rotate my touchpad mappings? Preferably without needing to restart xorg, so that I can batch together a rotate-screen command with a rotate-cursor command in a script. Thanks.
    Last edited by Riceboy004; October 10th, 2008 at 05:07 PM.

  2. #2
    Join Date
    Jan 2007
    Beans
    Hidden!

    Re: Rotate mouse/cursor axes

    (Bump)

  3. #3
    Join Date
    Feb 2007
    Beans
    160
    Distro
    Gutsy Gibbon Testing

    Re: Rotate mouse/cursor axes

    I've also been wondering about this. Anybody know if it's possible?
    Dell XPS M1530
    Core 2 Duo T8100 @ 2.10GHz | 4GB RAM
    320GB HDD | 256MB nVidia GeForce Go 8600M GT
    Registered Linux User: #441660 | Registered Ubuntu User: #11700

  4. #4
    Join Date
    Feb 2007
    Location
    Southampton, UK
    Beans
    Hidden!
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Rotate mouse/cursor axes

    Just found a solution to rotate the screen and the touchpad simultaneously. Here the procedure.

    1. Enable xrandr
    make sure that xrandr is installed:
    sudo apt-get install x11-xserver-utils

    Add this line to the xorg.conf file
    Code:
    Section "Device"
    	Identifier	"Configured Video Device"
    	...		...
    	Option		"RandRRotation" "true"
    EndSection
    then rotate the screen with this command:
    xrandr -o [right,left,inverted,normal]

    2. Patch the synaptic drives and enable touchpad XY flip

    The following section has been taken from this website.

    Modify the xorg.conf according to this:
    Code:
    Section "InputDevice"
            Identifier      "Synaptics Touchpad"
            Driver          "synaptics"
            Option          "SendCoreEvents"        "true"
            Option          "Device"                "/dev/psaux"
            Option          "Protocol"              "auto-dev"
            Option          "SHMConfig"             "true"
    EndSection
    Install those packages:
    sudo apt-get build-dep xserver-xorg-input-synaptics

    Get official sources:
    apt-get source xserver-xorg-input-synaptics

    Patch and compile the new drivers:
    cd xfree86-driver-synaptics-*/
    wget http://www.helsinki.fi/~rantalai/synaptics/axis_patch
    patch < axis_patch
    make


    Backup the original drivers
    mkdir original_drivers
    cp -p /usr/lib/xorg/modules/input/synaptics_drv.so original_drivers/
    cp -p /usr/bin/synclient original_drivers/


    Install the new drivers:
    sudo cp synclient /usr/bin/
    sudo cp synaptics_drv.so /usr/lib/xorg/modules/input/


    Usage:
    synclient Xrandr=0
    xrandr --orientation normal

    synclient Xrandr=1
    xrandr --orientation right

    synclient Xrandr=2
    xrandr --orientation left

    synclient Xrandr=3
    xrandr --orientation inverted


    You can also write a simple script that automatically rotate the screen and the mouse/touchpad. Create with your favourite text editor a file named rotation and copy&paste this:
    Code:
    #!/bin/sh
    if   [ $1 = "normal" ] ; then
        synclient Xrandr=0
        xrandr --orientation normal
    elif [ $1 = "right" ] ; then
        synclient Xrandr=1
        xrandr --orientation right
    elif [ $1 = "left" ] ; then
            synclient Xrandr=2
        xrandr --orientation left
    elif [ $1 = "inverted" ] ; then
        synclient Xrandr=3
        xrandr --orientation inverted
    else
        echo "rotation [normal,righ,left,inverted]"
    fi
    Then
    chmod +x rotation
    sudo cp -p rotation /usr/local/bin/


    Hope it works!
    Last edited by popperoga; November 15th, 2008 at 02:46 PM. Reason: typos

  5. #5
    Join Date
    Dec 2007
    Beans
    2

    Re: Rotate mouse/cursor axes

    Hey!
    Thanks very much for the post, rotating the cursor is sth i've been meaning to do for a long time, but i didn't have the skills to do it.

    I've followed all your steps and yet when i type:
    synclient Xrand=1
    I get:
    Can't access shared memory area. SHMConfig disabled?

    But i did change the xorg.config file to allow for the SHMConfig (i.e. I set it true).

    Any idea?

    Thanks a lot,

    ]d[

  6. #6
    Join Date
    Feb 2007
    Location
    Southampton, UK
    Beans
    Hidden!
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Rotate mouse/cursor axes

    Try to use this line in the xorg.conf:
    Code:
    Option          "SHMConfig"             "on"

  7. #7
    Join Date
    Feb 2010
    Beans
    3

    Re: Rotate mouse/cursor axes

    [QUOTE=Riceboy004;5939785]I've just discovered the magic of screen rotation and xrandr. My laptop (Asus S5n) is small enough that I can hold it like a book, and subsequently i can read pdf's as if i was reading book. However, it is a little annoying that my touchpad control doesn't change. Holding in book position, "up" on the touchpad translates to "right" on the screen. Is there any way to rotate my touchpad mappings? Preferably without needing to restart xorg, so that I can batch together a rotate-screen command with a rotate-cursor command in a script. Thanks.[/Q

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
  •