summarylogtreecommitdiffstats
path: root/50-joystick-example.conf
blob: 1e684d550f57b8ed309bbcf0388300e13575af59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
### Example file for configuring the "joystick" input driver.
#   See `man 4 joystick`.
#   Keycodes are the ones reported by `xev`.

Section "InputClass"
  Identifier                 "GPD Win Max 2/ X-Box 360 gaming input device"
  # As reported when using the `xpad` kernel driver:
  #MatchProduct               "Microsoft X-Box 360 pad (keys)"
  MatchProduct               "Microsoft X-Box 360 pad"
  MatchIsJoystick "on"
  MatchDevicePath "/dev/input/event*"
  Driver "joystick"

  # Option "DebugLevel"        "0"
  Option "Floating"          "off"

  ## Should key and mouse event generation be enabled or disabled at startup? (Can be changed with button defined as "disable-*".)
  Option "StartKeysEnabled"  "off"
  Option "StartMouseEnabled" "off"

  ## Buttons:
  #  Left joystick click:  10  -> none
  #  Right joystick click: 11  -> none
  #  X:                     3  -> left mouse click
  # #  X:                     3  -> cursor left
  #  B:                     2  -> right mouse click
  # #  B:                     2  -> cursor right
  #  Y:                     4  -> middle mouse click
  # #  Y:                     4  -> cursor up
  #  A:                     1  -> cursor down
  # #  A:                     1  -> cursor down
  #  Select:                7  -> right Ctrl key
  #  Menu:                  9  -> right windows key
  #  Start:                 8  -> toggle joystick driver reporting mouse and keyboard events
  #  Left trigger ("R1"):   5  -> left mouse click
  #  Right trigger ("L1"):  6  -> right mouse click
  Option "MapButton10"  "none"
  Option "MapButton11"  "none"
  Option "MapButton3"   "button=1"
  # Option "MapButton3"   "key=113"
  Option "MapButton2"   "button=3"
  # Option "MapButton2"   "key=114"
  Option "MapButton4"   "button=2"
  # Option "MapButton4"   "key=111"
  Option "MapButton1"   "key=116"
  # Option "MapButton1"   "key=116"
  Option "MapButton7"   "key=105"
  Option "MapButton9"   "key=135"
  Option "MapButton8"  "disable-all"
  Option "MapButton5"  "button=1"
  Option "MapButton6"  "button=3"

  ## Axes:
  #  Left joystick left-right:  1  -> mouse left / right
  #  Left joystick up-down:     2  -> mouse up / down
  #  Right joystick left-right: 4  -> mouse left / right
  #  Right joystick up-down:    5  -> mouse up / down
  #  Left shoulder ("L1"):      3 (not pressed is min. value)  -> none
  #  Right shoulder ("L2"):     6 (not pressed is min. value)  -> none
  #  D-pad left / right:        7  -> scroll left / right
  #  D-pad up / down:           8  -> scroll up / down
  Option "MapAxis1"  "mode=relative axis=x deadzone=256"
  Option "MapAxis2"  "mode=relative axis=y deadzone=256"
  Option "MapAxis4"  "mode=relative axis=x deadzone=256"
  Option "MapAxis5"  "mode=relative axis=y deadzone=256"
  Option "MapAxis3"  "mode=none"
  Option "MapAxis6"  "mode=none"
  Option "MapAxis7"  "mode=accelerated axis=zx deadzone=256"
  Option "MapAxis8"  "mode=accelerated axis=zy deadzone=256"

EndSection