1
0
Fork 0

Input: clarify gamepad API ABS values

It wasn't really clear from the gamepad-API description how ABS values are
mapped exactly. Clarify that negative is left/up and positive is
right/down. Unfortunately, this means I screwed up the Wii U ProController
ABI. Anyhow, this just means we continue to have 0 compatible gamepad
drivers in the kernel. User-space needs to fix them up, anyway, as all
other gamepads are also incompatible.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
hifive-unleashed-5.1
David Herrmann 2013-10-08 22:48:33 -07:00 committed by Dmitry Torokhov
parent e3c55d406b
commit 1ccd33b8f6
1 changed files with 3 additions and 0 deletions

View File

@ -122,12 +122,14 @@ D-Pad:
BTN_DPAD_*
Analog buttons are reported as:
ABS_HAT0X and ABS_HAT0Y
(for ABS values negative is left/up, positive is right/down)
Analog-Sticks:
The left analog-stick is reported as ABS_X, ABS_Y. The right analog stick is
reported as ABS_RX, ABS_RY. Zero, one or two sticks may be present.
If analog-sticks provide digital buttons, they are mapped accordingly as
BTN_THUMBL (first/left) and BTN_THUMBR (second/right).
(for ABS values negative is left/up, positive is right/down)
Triggers:
Trigger buttons can be available as digital or analog buttons or both. User-
@ -138,6 +140,7 @@ Triggers:
ABS_HAT2X (right/ZR) and BTN_TL2 or ABS_HAT2Y (left/ZL).
If only one trigger-button combination is present (upper+lower), they are
reported as "right" triggers (BTN_TR/ABS_HAT1X).
(ABS trigger values start at 0, pressure is reported as positive values)
Menu-Pad:
Menu buttons are always digital and are mapped according to their location