Re: [PATCH 16/26] HID: wiimote: add Classic Controller extension

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 5, 2013 at 5:13 PM, David Herrmann <dh.herrmann@xxxxxxxxx> wrote:

> Add a new extension module for the classic controller so we get hotplug
> support for this device. It is mostly the same as the old static classic
> controller parser.

    Could the buttons/axis values on this please be mapped as
appropriate for the standard gamepad?  What I'd like, ideally, with
new #defines in input.h as needed:

- left stick to ABS_LX, ABS_LY
- right stick to ABS_RX, ABS_RY
- dpad to ABS_DX, ABS_DY
- left trigger to ABS_LTRIG
- right trigger to ABS_RTRIG
- x to BTN_NORTH
- a to BTN_EAST
- b to BTN_SOUTH
- y to BTN_WEST
- zl to BTN_LSHOULDER
- zr to BTN_RSHOULDER
- plus to BTN_START
- minus to BTN_SELECT
- home to BTN_SYSTEM

    I'm trying to get all of the gamepads to use a common control
mapping.  Mapping functions by placement on the controller is far more
useful to games than mapping them by the names assigned by the
manufacturer.  There is no consistency on button naming between
manufacturers, but there is a lot of consistency in functionality and
layout.  I'm hoping that as we bring new gamepads online, we can
expose that layout consistency.

    As an example of what I mean, the classic controller x button is
in the same position as:

- the x button on nintendo gamepads (oddly...)
- the y button on xbox-family gamepads
- the y button on sega gamepads
- the y button on the ouya gamepads
- the p button on the gamestick gamepad
- the triangle button on playstation-family gamepads
- the triangle button on some futime gamepads
- the not-quite-a-triangle don't sue us sony button on at least one
betop gamepad (google for the football one)
- the blue button on gravis controllers
- the 1 button on the noga.net gamepad
- the 1 button on some saitek gamepads
- the 2 button on some steelseries gamepads
- the 4 button on some other steelseries gamepads
- the 4 button on some logitech gamepads
- probably every glyph in the basic multilingual plane on some gamepad or other

    I want those all to map to BTN_NORTH.  They're all at the top of a
diamond-shaped cluster of 4 face buttons under the player's right
thumb.  From a game development point of view, it's that position that
matters, because I'm going to be assigning functions to buttons based
on how accessible the buttons are rather than what random name the
manufacturer may have assigned to them.  Especially when for a while
there was some worry about whether the pattern of button labels was
copyrightable, so the second tier hardware manufacturers were
explicitly avoiding using established button naming conventions.

    If you look at the above list, it clearly doesn't make any sense
to use the button labels to identify these.  It makes far more sense
to identify them by layout position in a standardized layout.

    It seems like there's going to need to be a mapping layer for
gamepads that already have established interfaces (and I'm actually
writing a library to do that right now...), but I'd really prefer if
the library was just for legacy support.

                                       Todd.

--
 Todd Showalter, President,
 Electron Jump Games, Inc.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux