Skip to content

Commit aaf9978

Browse files
HarryCuttsJiri Kosina
authored andcommitted
Input: Add the REL_WHEEL_HI_RES event code
This event code represents scroll reports from high-resolution wheels, and will be used by future patches in this series. See the linux-input "Reporting high-resolution scroll events" thread [0] for more details. [0]: https://www.spinics.net/lists/linux-input/msg57380.html Signed-off-by: Harry Cutts <hcutts@chromium.org> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
1 parent 7a324b3 commit aaf9978

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Documentation/input/event-codes.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,16 @@ A few EV_REL codes have special meanings:
190190
* REL_WHEEL, REL_HWHEEL:
191191

192192
- These codes are used for vertical and horizontal scroll wheels,
193-
respectively.
193+
respectively. The value is the number of "notches" moved on the wheel, the
194+
physical size of which varies by device. For high-resolution wheels (which
195+
report multiple events for each notch of movement, or do not have notches)
196+
this may be an approximation based on the high-resolution scroll events.
197+
198+
* REL_WHEEL_HI_RES:
199+
200+
- If a vertical scroll wheel supports high-resolution scrolling, this code
201+
will be emitted in addition to REL_WHEEL. The value is the (approximate)
202+
distance travelled by the user's finger, in microns.
194203

195204
EV_ABS
196205
------

include/uapi/linux/input-event-codes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,7 @@
708708
#define REL_DIAL 0x07
709709
#define REL_WHEEL 0x08
710710
#define REL_MISC 0x09
711+
#define REL_WHEEL_HI_RES 0x0a
711712
#define REL_MAX 0x0f
712713
#define REL_CNT (REL_MAX+1)
713714

0 commit comments

Comments
 (0)