blob: 3f6623377909ceb7576b96e8da02dac6c3ad4c4c [file] [log] [blame]
From dbf871c7a4ec1988b7963c1e49dd51e3276eedb7 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <>
Date: Wed, 5 Dec 2018 10:42:21 +1000
Subject: [PATCH] UPSTREAM: Input: add `REL_WHEEL_HI_RES` and
This event code represents scroll reports from high-resolution wheels and
is modelled after the approach Windows uses. The value 120 is one detent
(wheel click) of movement. Mice with higher-resolution scrolling can send
fractions of 120 which must be accumulated in userspace. Userspace can either
wait for a full 120 to accumulate or scroll by fractions of one logical scroll
movement as the events come in. 120 was picked as magic number because it has
a high number of integer fractions that can be used by high-resolution wheels.
For more information see
These new axes obsolete REL_WHEEL and REL_HWHEEL. The legacy axes are emulated
by the kernel but the most accurate (and most granular) data is available
through the new axes.
Signed-off-by: Peter Hutterer <>
Acked-by: Dmitry Torokhov <>
(am from
(also found at
(cherry picked from commit 52ea899637c746984d657b508da6e3f2686adfca)
Change-Id: I205f0722ab9333834dbac156a0fbff244194e370
Signed-off-by: Harry Cutts <>
Reviewed-by: Sean Paul <>
Reviewed-by: Dmitry Torokhov <>
diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
index 61769d4b7dbac7..3c755b6815c574 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -706,6 +706,8 @@
#define REL_DIAL 0x07
#define REL_WHEEL 0x08
#define REL_MISC 0x09
+#define REL_WHEEL_HI_RES 0x0b
+#define REL_HWHEEL_HI_RES 0x0c
#define REL_MAX 0x0f
#define REL_CNT (REL_MAX+1)