You are not logged in.

#1 2014-01-29 17:51:52

zakkudo
Member
Registered: 2013-03-31
Posts: 10

Two Nunchucks to USB [Solved]

I'm using a USB->Wii attachment converter to plug in two nunchucks to play The Stanley Parable.  By default, the left nunchuck seems to turn, while the right nunchuck seems to combine both moving and turning onto one stick.  I'm assuming this is because most programs assume that the left and the right thumbstick will be part of the same device.  Is there anyway around this with 50-joystick.conf?  I tried setting the device matching, but it never seems to go right, as well as disabling keyboard/mouse controll and setting floating.

Edit:

So the first connected nunchuck is recognized by the game.  If I try to set the nunchuck as a mouse, it will multiplex the controls on top of eachother causing wierdness.  The mouse control has to be js1, not js0.  Now I can play The Stanley Parable with two joysticks. smile

Section "InputClass"
	Identifier "joystick-keyboard" #Most software will recognize the first nunchuck as the p1 joystick
	MatchIsJoystick "on"
	MatchDevicePath "/dev/input/js0"
	Driver "joystick"

  Option "StartKeysEnabled" "True"
  Option "StartMouseEnabled" "False"

  #Option  "MapAxis1"      "mode=accelerated keylow=113  keyhigh=114"
  #Option  "MapAxis2"      "mode=accelerated keylow=111  keyhigh=116"

  #Option "MapButton1" "key=45 button=none" #K Key
  #Option "MapButton2" "key=9 button=none" #Escape
  #Option "MapButton3" "key=9 button=none" #Escape
EndSection

Section "InputClass" #So we make the second joystick the mouse
	Identifier "joystick-mouse"
	MatchIsJoystick "on"
	MatchDevicePath "/dev/input/js1"
	Driver "joystick"

  Option "StartKeysEnabled" "False"
  Option "StartMouseEnabled" "True"

  Option "MapButton1" "button=1"
  Option "MapButton2" "button=2"
  Option "MapButton3" "button=3"
EndSection

Last edited by zakkudo (2014-01-30 17:22:33)

Offline

#2 2014-01-29 19:06:52

zakkudo
Member
Registered: 2013-03-31
Posts: 10

Re: Two Nunchucks to USB [Solved]

So the gist of the problem is:  I want one nunchuck to function as a mouse, and the other nunchuck to function as a keyboard.

Offline

#3 2014-01-29 21:04:07

zakkudo
Member
Registered: 2013-03-31
Posts: 10

Re: Two Nunchucks to USB [Solved]

This is my current /etc/X11/xorg.conf.d/50-joystick.conf.  I haven't tested it yet, but it might be getting closer to what I need.

Section "InputClass"
  Identifier "joystick-mouse"
  MatchIsJoystick "on"
  MatchDevicePath "/dev/input/js0"
  Driver "joystick"

  Option "StartKeysEnabled" "False"

  Option "MapButton1" "button=1"
  Option "MapButton2" "button=2"
  Option "MapButton3" "button=3"
EndSection

Section "InputClass"
  Identifier "joystick-keyboard"
  MatchIsJoystick "on"
  MatchDevicePath "/dev/input/js1"
  Driver "joystick"

  Option "StartMouseEnabled" "False"

  Option  "MapAxis1"      "mode=accelerated keylow=113  keyhigh=114"
  Option  "MapAxis2"      "mode=accelerated keylow=111  keyhigh=116"

  Option "MapButton1" "key=Enter"
  Option "MapButton2" "key=65" #Space
  Option "MapButton3" "key=65" #Space
EndSection

Offline

#4 2014-01-29 21:16:24

Jellicent
Member
From: Berlin
Registered: 2013-09-13
Posts: 189

Re: Two Nunchucks to USB [Solved]

You could try editing your post to add new information instead of replying to your own topic. wink

Offline

#5 2014-01-30 17:19:46

zakkudo
Member
Registered: 2013-03-31
Posts: 10

Re: Two Nunchucks to USB [Solved]

Good call.  I'll do that now that I figured this out. :3

Offline

#6 2014-01-30 17:23:24

zakkudo
Member
Registered: 2013-03-31
Posts: 10

Re: Two Nunchucks to USB [Solved]

Updated the first post to make this post unneeded.

Offline

Board footer

Powered by FluxBB