]> git.baikalelectronics.ru Git - kernel.git/commit
input: document gamepad API and add extra keycodes
authorDavid Herrmann <dh.herrmann@gmail.com>
Sat, 15 Jun 2013 13:32:44 +0000 (15:32 +0200)
committerJiri Kosina <jkosina@suse.cz>
Tue, 20 Aug 2013 10:31:35 +0000 (12:31 +0200)
commit0ffc891b44dd60e3b4169eb81c266a2eac807635
tree85d2e41b6ce592689479c9ce79d81b1e17087323
parente2e83c53d93823c0f59bbdc8f42ab0aaeda7dc68
input: document gamepad API and add extra keycodes

Until today all gamepad input drivers report their data differently. It is
nearly impossible to write applications for more than one device in a
generic way. Therefore, this patch introduces a uniform gamepad API which
will be used for all new drivers.

Instead of mapping buttons by their labels, we now map them by position.
This allows applications to work with any gamepad regardless of the labels
on the buttons. Furthermore, we standardize the ABS_* codes for analog
triggers and sticks.

For D-Pads the long overdue BTN_DPAD_* codes are introduced. They should
be fairly obvious how to use. To avoid confusion, the action buttons now
have BTN_EAST/SOUTH/WEST/NORTH aliases.

Reported-by: Todd Showalter <todd@electronjump.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Documentation/input/gamepad.txt [new file with mode: 0644]