Skip to content

hid-magicmouse: Emulate horizontal scrolling.

Michael Poole linux-input 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1hid-magicmouse: Emulate horizontal scrolling.drivers/hid/hid-magicmouse.c+69 -272 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] hid-magicmouse: Emulate horizontal scrolling.

This patch is separate from the changes about input device registration, except for having some context lines in common with Benjamin's patch. I found a use case for horizontal scrolling while moving left to right in an OpenOffice.org spreadsheet, and this gesture seems basic enough to merit inclusion in the kernel.

Some areas that may deserve revision or more attention before commit:

1) It might make sense to separately commit the parameter for the acceleration profile. I didn't do that because they touch the same code and exporting the module parameter is so few lines.

2) The acceleration profile is faster than the original, which was not as responsive as my mice with physical scroll wheels. However, the horizontal scrolling may be a little too sensitive: I have to be somewhat careful to only drag vertically, or else it will generate horizontal scroll events. This would be fixable using a different scroll_accel_profile-like array for each direction. Other potential solutions (such as heuristics to guess the direction of the swipe) seemed better left to user space.

3) The initial calculation of num_scroll_accel_profile is not pretty. It seemed marginally better to calculate it at module load time than hard-code the default value, but that's debatable. I don't see a reasonable way to calculate the default value at compile time.

Michael Poole