Results 1 to 5 of 5

Thread: Joystick/gamepad Moving Mouse

  1. #1
    Join Date
    Aug 2011
    Beans
    38

    Joystick/gamepad Moving Mouse

    Whenever I use the D-Pad, or left joystick on my gamepad (This one) it moves my mouse. This is kinda good when I do things that require the mouse, as I can also click with some of the other buttons, but very, very annoying when I am playing a game, as it moves out of the screen then clicks out of it.

    So, I am hoping someone knows how to stop the controller from using the mouse functions.
    Beginner, ubuntu 10.04 lucid lynx

  2. #2
    Join Date
    Oct 2007
    Beans
    139

    Re: Joystick/gamepad Moving Mouse

    Hi mschooler93,I know this is a bit old but I know why you get that. You need to remove it from the core pointer. So first look at the list

    xinput list
    You will see your controller under "Virtual core pointer"

    to disable it from the list of virtual pointer do this
    xinput --set-prop "your device as it spears in the list" "Device Enabled" 0


    I'm also told this will work ( not tried it myself)

    add these lines to you /usr/share/X11/xorg.conf.d/50-joystick.conf
    Option "StartKeysEnabled" "False"
    Option "StartMouseEnabled" "False"
    Last edited by ulao; February 1st, 2012 at 05:08 AM.

  3. #3
    Join Date
    Sep 2007
    Beans
    144

    Re: Joystick/gamepad Moving Mouse

    Quote Originally Posted by mschooler93 View Post
    So, I am hoping someone knows how to stop the controller from using the mouse functions.
    Try:

    apt-get remove xserver-xorg-input-joystick

  4. #4
    Join Date
    Oct 2007
    Beans
    139

    Re: Joystick/gamepad Moving Mouse

    I tried to remove it but didnt stop the mouse from following the joystick. I also tried to reboot and still no luck.

  5. #5
    Join Date
    Feb 2009
    Location
    Arcadia, CA USA
    Beans
    502
    Distro
    Ubuntu Mate 22.04 Jammy Jellyfish

    Re: Joystick/gamepad Moving Mouse

    I posted all the following under >Games Leisure, but thot it appropriate to post here also since it addresses the request for help.

    Following are now two scripts which work without generating error msgs. The 1st is the one discussed so far. The 2nd one works and seem to make the change permanent - I could not get back to a condition where the USB joysticks affected the mouse cursor. And of course, this is just fine since it is the condition I want. But it would be interesting to know where the change took place. Also, I was hoping to use the 2nd option on a second computer I have, but USB joystick activity was already separated from the mouse cursor. I do not know why as I had not yet looked at the separation issue on the 2nd computer.

    Option 1 (do for each boot):
    Code:

    Code:
    #!/bin/bash
    NAME="WAILLY PPM"
    ids=$(xinput list | grep $NAME | grep -o -e "id=.." | xargs | sed "s/id=//g")
    for id in $ids; do
       echo "Disabling Mouse/Key events for ID $id"
       xinput set-prop $id "WAILLY PPM" "Generate Mouse Events" 0
       xinput set-prop $id "WAILLY PPM" "Generate Key Events" 0
    done
    Option 2 (which seems to make a permanent change):
    Code:

    Code:
    #!/bin/bash
    NAME='WAILLY PPM'
    
    ids=$(xinput list | grep  "$NAME" | grep -o -e "id=.." | xargs | sed "s/id=//g")
    for id in $ids; do
        echo "Disabling Mouse/Key events for ID $id"
        xinput set-prop $id "WAILLY PPM" "Device Enabled" 0
    done

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
  •