Bug 89006

Summary: wiimote not working
Product: Wayland Reporter: Damian <damianatorrpm>
Component: libinputAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: medium CC: damianatorrpm, peter.hutterer, samuel
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: wiimote not working

Description Damian 2015-02-06 08:51:03 UTC
Created attachment 113219 [details]
wiimote not working

Hi,

I have a wiimtoe with accessories (nunchuk and classic controller).
According to https://github.com/dvdhrm/xf86-input-xwiimote/issues/18
the wiimote should work with libinput.

I am using the xorg-x11-drv-libinput driver!

1) Installed xorg-x11-drv-libinput and installed wacom/synaptics/evdev
2) put:

Section "InputClass"
Identifier "libinput"
Driver "libinput"
MatchDevicePath "/dev/input/event*"
EndSection
in /etc/xorg.conf.d/99-wiimote.conf

4) connected wiimote via bluetooth
5) no keys are recognized or configured

Attaching: xorg.log (not attaching evemu-record as their seems to be a problem with creating the devices)

PS: How should the configuration be done for this with libinput?
with xwiimote driver you have lots of config options...
How should the keymapping be? Shall they be mapped to standard keyboard buttons or to Joypad_BUTTON_FOOBAR?
How shall the mouse emulation work and or the joysticks on nunchuk/classic controller?
Comment 1 Peter Hutterer 2015-02-08 21:20:39 UTC
evemu-record records at the kernel level, it provides us enough information about why the device isn't handled in libinput. from the logs it looks like the wiimote just doesn't look like anything that libinput currently recognises (well, the remote and the remote classic devices look like joysticks which libinput ignores on purpose).

(In reply to Damian from comment #0)
> PS: How should the configuration be done for this with libinput?
> with xwiimote driver you have lots of config options...
> How should the keymapping be? Shall they be mapped to standard keyboard
> buttons or to Joypad_BUTTON_FOOBAR?
> How shall the mouse emulation work and or the joysticks on nunchuk/classic
> controller?

what exactly is it you want to do with the wiimote?
Comment 2 Damian 2015-02-09 18:14:09 UTC
Well I was hoping that all functionality will be supported in libinput,
including joystick etc.

With the X driver for the wiimote I can use the wiimote and map the buttons (in the x.conf file) and also the nunchuk can be used as a joystick.
The classic controller is the only thing not working yet with the x11 driver.

Will Joysticks be supported?
Will I be able to use it as I do with X11 driver?
Comment 3 Peter Hutterer 2015-02-10 07:07:35 UTC
ok, I have to say we probably won't support this in libinput, at least not in the way you want it to happen.

libinput is about to gain buttonset support, i.e. support for devices that are just sets of buttons with some other non-x/y axes. This could in theory be extended to support the wiimote but the other functionality you want wouldn't be handled by libinput itself. This is something you'd need the compositor to handle for you. So even if libinput supports the wiimote it won't work as and how you want it.

This is a rather custom use case, for the time being you'll need to keep using the custom driver.
Comment 4 Damian 2015-02-11 07:22:25 UTC
so just that i understand it right:
libinput is NOT supposed to support josticks?
what's the plan on wayland? how will joysticks be supported?
every compositor writes it's own joystick support?
Comment 5 Peter Hutterer 2015-02-11 07:34:30 UTC
we don't currently have a plan to support joysticks (or gamepads). They are quite complicated because they're so varied. If libinput could normalize access to them that could be useful but as it stands libinput can provide little here to help, it would essentially just forward buttons and axes. toolkits like SDL are happy enough just opening the evdev device directly. Until that changes and the toolkits require some joystick/gamepad handling we'll leave it aside for libinput.

libinput will probably never get the ability to control a pointer through a joystick. it is, quite frankly, too much of a niche usecase and libinput is the wrong layer of the stack for this anyway.
Comment 6 Peter Hutterer 2015-08-06 04:26:38 UTC
closing as per comment #5. we might revisit this when we have requests from game developers that rely on joysticks but for now this remains a WONTFIX

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.