Comment 13 for bug 30378

Revision history for this message
Daniel Ellis (danellisuk) wrote :

Agree whole heartedly with Stephan Sokolow. We need a way to have the X server handle the joystick without having it send the mapped events to other applications. Was there any response from upstream?

For now, here is how you can enable the joystick within the X server:-

sudo apt-get install xserver-xorg-input-joystick

This creates the file /usr/share/X11/xorg.conf.d/50-joystick.conf

Now to disable the mouse integration, and create a mapping of the buttons so they all behave as shift keys, edit the file to look as follows:-

Section "InputClass"
        Identifier "joystick catchall"
        MatchIsJoystick "on"
        MatchDevicePath "/dev/input/event*"
        Driver "joystick"
        Option "StartKeysEnabled" "True"
        Option "StartMouseEnabled" "False"
        Option "MapButton1" "key=50"
        Option "MapButton2" "key=50"
        Option "MapButton3" "key=50"
        Option "MapButton4" "key=50"
EndSection

Now pressing any of the four mains buttons will prevent the screensaver from appearing. Although, this will not work for any games that you only use the direction pads on. I think most games involve button presses, so hopefully this is a practical solution for people until a proper solution is available.