Advertisement
Guest User

Using your gamepad as mouse, scroll, click on linux / xorg !

a guest
Oct 1st, 2014
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.41 KB | None | 0 0
  1. #(put this file to your xorg configuration directory, or add it to your xorg.conf file)
  2. #works with a Saitek X6-38U USB gamepad as is, others might need adjustments.
  3. # cat saitek_impact.conf
  4. # /etc/X11/xorg.conf.d/saitek_impact.conf
  5. #(put this file to your xorg configuration directory, or add it to your xorg.conf file)
  6. #works with a Saitek X6-38U USB gamepad as is, others might need adjustments.
  7.  
  8.  
  9. Section "InputClass"
  10. Identifier "Saitek_IMPACT_Gamepad"
  11. Option "MatchIsJoystick" "on"
  12. Option "MatchUSBID" "07b5:0315"
  13. # Option "MatchVendor" "07b5"
  14. # Option "MatchProduct" "0315"
  15.  
  16. Option "DebugLevel" "0"
  17. #If compiled with debugging information, controls the verbosity of the driver. The higher the DebugLevel, the more output is produced. Default: 0
  18. Option "StartKeysEnabled" "True"
  19. Option "StartMouseEnabled" "True"
  20.  
  21. #deadzone ok now as 500, might decrease again, try 250
  22. #now testing with the expo hacked joystick driver
  23. # right stick axes: point
  24. Option "MapAxis4" "mode=relative axis=+1x deadzone=200"
  25. Option "MapAxis3" "mode=relative axis=+1y deadzone=200"
  26.  
  27. # left stick axes: scroll
  28. Option "MapAxis1" "mode=relative axis=+1zx deadzone=200"
  29. Option "MapAxis2" "mode=relative axis=+1zy deadzone=200"
  30.  
  31. # Directional pad: point
  32. # Option "MapAxis5" "mode=accelerated axis=+1x deadzone=500"
  33. # Option "MapAxis6" "mode=accelerated axis=+1y deadzone=500"
  34. # Directional pad: scroll
  35. # Option "MapAxis5" "mode=accelerated axis=+1zx deadzone=500"
  36. # Option "MapAxis6" "mode=accelerated axis=+1zy deadzone=500"
  37.  
  38. # Directional pad: press arrow keys...
  39. Option "MapAxis5" "mode=accelerated keylow=113 keyhigh=114 axis=1.0key"
  40. Option "MapAxis6" "mode=accelerated keylow=111 keyhigh=116 axis=1.0key"
  41. #relative goes at max rate always...
  42. # Option "MapAxis5" "mode=relative keylow=113 keyhigh=114 axis=1.0key"
  43.  
  44.  
  45. # Option "MapAxis1" "mode=relative keylow=113 keyhigh=114 axis=0.5key"
  46. # Option "MapAxis2" "mode=relative keylow=111 keyhigh=116"
  47. # Option "MapAxis3" "mode=accelerated keylow=113 keyhigh=114"
  48. # Option "MapAxis4" "mode=accelerated keylow=111 keyhigh=116"
  49. #will map the first and third axis to the arrow keys left and right and the second and fourth axis to the arrow keys up and down. The keys for the first two axes will be generated in an interval according to the value of the axis. The autorepeat speed of the first axis will be half the speed of that of the second axis. The keys for the third and fourth axis are generated once when the axis moves out of the deadzone and when it moves back into the deadzone. X.Org will autorepeat those keys according to current keyboard settings.
  50.  
  51.  
  52.  
  53.  
  54. # Buttons 7, 8 and 5 : click
  55. # Triggers: no use
  56. Option "MapButton7" "button=1"
  57. Option "MapButton5" "button=2"
  58. Option "MapButton8" "button=3"
  59. # Option "MapButton6" "none"
  60. Option "MapButton6" "amplify=2"
  61. #Amplifies the movement of all axes by the given factor when pressed. Different factors can be combined.
  62.  
  63.  
  64. Option "MapButton2" "button=4" # mouse scroll up
  65. Option "MapButton4" "button=5" # mouse scroll down
  66.  
  67.  
  68. # Rear buttons: back and forward
  69. Option "MapButton1" "key=166" # XF86Back
  70. Option "MapButton3" "key=167" # XF86Forward
  71. # Option "MapButton1" "button=8" # browser mouse back
  72. # Option "MapButton3" "button=9" # browser mouse forward
  73.  
  74.  
  75. # Special buttons
  76. Option "MapButton9" "key=135" # select : Menu
  77. # Option "MapButton10" "key=172" # start : XF86AudioPlay
  78. #Option "MapButton13" "key=180" # home : XF86HomePage
  79.  
  80. # Sticks click: click
  81. Option "MapButton11" "button=3" # clic left stick
  82. Option "MapButton12" "button=1" # clic right stick
  83.  
  84. Option "MapButton10" "disable-all"
  85. #"disable-mouse" "disable-keys" "disable-all"
  86. #Disables either the generation of mouse events, key events or the generation of all X events by the driver. Press button again to allow the driver to generate events again.
  87.  
  88. EndSection
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement