summaryrefslogtreecommitdiff
path: root/libevdev/libevdev.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-11-20 11:58:08 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-12-10 19:39:47 +1000
commit546efc783c7b952db1ebe6f10430ed7d73a2cb81 (patch)
treedbe47f19c6dfc9ce799dffc41abba7fc626756b6 /libevdev/libevdev.h
parent714c2ffa9e5891fe423212f623572c5dd6b7a04b (diff)
downloadlibevdev-546efc783c7b952db1ebe6f10430ed7d73a2cb81.tar.gz
Don't treat devices with (ABS_MT_SLOT - 1) as multitouch devices
Some devices (PS3 sixaxis controller) merely have a bunch of axes, without the semantic information that linux/input.h requires. For those, the ABS_MT range may be merely another axis, not the special range that we need to treat it with. Use a simple heuristic: if ABS_MT_SLOT - 1 is enabled, don't treat ABS_MT as multitouch axes. The ABS_MT_SLOT - 1 axis is not used for a real axis. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Diffstat (limited to 'libevdev/libevdev.h')
-rw-r--r--libevdev/libevdev.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libevdev/libevdev.h b/libevdev/libevdev.h
index 2b6f48a..44aa3a6 100644
--- a/libevdev/libevdev.h
+++ b/libevdev/libevdev.h
@@ -361,6 +361,15 @@ extern "C" {
*
* As with @ref bits, the logical state of the device as seen by the library
* depends on the caller using libevdev_next_event().
+ *
+ * The Linux kernel requires all axes on a device to have a semantic
+ * meaning, matching the axis names in linux/input.h. Some devices merely
+ * export a number of axes beyond the available axis list. For those
+ * devices, the multitouch information is invalid. Specfically, if a device
+ * provides the ABS_MT_SLOT axis AND also the (ABS_MT_SLOT - 1) axis, the
+ * device is not treated as multitouch device. No slot information is
+ * available and the ABS_MT axis range for these devices is treated as all
+ * other EV_ABS axes.
*/
/**