Skip to content

Commit

Permalink
Input: Add the REL_WHEEL_HI_RES event code
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Dmitry Torokhov <[email protected]>
Reviewed-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
HarryCutts authored and Jiri Kosina committed Sep 5, 2018
1 parent 7a324b3 commit aaf9978
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Documentation/input/event-codes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,16 @@ A few EV_REL codes have special meanings:
* REL_WHEEL, REL_HWHEEL:

- These codes are used for vertical and horizontal scroll wheels,
respectively.
respectively. The value is the number of "notches" moved on the wheel, the
physical size of which varies by device. For high-resolution wheels (which
report multiple events for each notch of movement, or do not have notches)
this may be an approximation based on the high-resolution scroll events.

* REL_WHEEL_HI_RES:

- If a vertical scroll wheel supports high-resolution scrolling, this code
will be emitted in addition to REL_WHEEL. The value is the (approximate)
distance travelled by the user's finger, in microns.

EV_ABS
------
Expand Down
1 change: 1 addition & 0 deletions include/uapi/linux/input-event-codes.h
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,7 @@
#define REL_DIAL 0x07
#define REL_WHEEL 0x08
#define REL_MISC 0x09
#define REL_WHEEL_HI_RES 0x0a
#define REL_MAX 0x0f
#define REL_CNT (REL_MAX+1)

Expand Down

0 comments on commit aaf9978

Please sign in to comment.