[PATCH v4 2/5] input: add an EV_REL event for high-res vertical wheel

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

 



As some devices can produce either low-res or high-res
vertical wheel EV_REL events, add a new event to allow
userspace to distinguish between them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx>
---
 Documentation/input/event-codes.txt    | 17 ++++++++++++++---
 include/uapi/linux/input-event-codes.h |  1 +
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/Documentation/input/event-codes.txt b/Documentation/input/event-codes.txt
index 575415f4cef0..50352ab5f6d4 100644
--- a/Documentation/input/event-codes.txt
+++ b/Documentation/input/event-codes.txt
@@ -156,9 +156,20 @@ instead of EV_REL codes.
 
 A few EV_REL codes have special meanings:
 
-* REL_WHEEL, REL_HWHEEL:
-  - These codes are used for vertical and horizontal scroll wheels,
-    respectively.
+* REL_WHEEL:
+
+  - These codes are used for vertical scroll wheels.
+
+  - REL_WHEEL is for normal wheel operational mode, e. g. low-resolution
+    (line-based) scroll.
+
+  - REL_HIRES_WHEEL should be used when the wheel has two resolutions and it
+    is in high-resolution mode, e. g. the same angular movement that would
+    produce a single REL_WHEEL will produce multiple REL_HIRES_WHEEL events.
+
+* REL_HWHEEL:
+
+  - This code is used for horizontal scroll wheels.
 
 EV_ABS:
 ----------
diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
index 444956ba832c..da48d4079511 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -710,6 +710,7 @@
 #define REL_MISC_4		0x0d
 #define REL_MISC_5		0x0e
 #define REL_MISC_6		0x0f
+#define REL_HIRES_WHEEL		0x10
 #define REL_MAX			0x1f
 #define REL_CNT			(REL_MAX+1)
 
-- 
2.9.3

--
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