dvdhrm/xwiimote — Issue #2: Axes & sideways
Author: mikeru
Created: 2011-12-26 14:32:44+00:00
State: open

The module should support the D-pad as axes. I've found that most games expect them as axes, and when they don't, at least they're not expecting KEY_*s.

I made a patch to deal with this, it can be found at http://pastebin.com/fGu8Bnpq . It adds supports for D-pad as axes and uses it as default. It also changes the D-pad mappings when in button mode to BTN_TRIGGER_HAPPY*, as the xpad driver for XBox controllers uses them for this mode. KEY_* mappings are for keyboards, not for controllers :P

It also adds support for handling the D-pad when the Wii Remote is being held sideways. As no app in linux that accesses gamepads has specific code to handle wiimotes, the user-space tools should allow to set the wiimote to have its D-pad correctly handled when being held sideways. However, the userspace tools aren't yet ready, and they might require at the end some help from the kernel module (unless they perform XTest mumo jumbo or something like that). The sideways mode can be enabled when loading the module or at runtime by setting /sys/modules/hid_wiimote/parameters/sideways to Y.
Nevertheless, this is just an stopgap measure until the userspace xwiimote apps are ready. Also, I don't know about a way to have module parameters changed by normal users, so the userspace apps would need another way to communicate with the kernel driver to set the sideways mode, or do some xserver-black-magic or whatever)