Logitech MX Master 2S and 3 by default use natural scrolling
for the horizontal scroll wheel, while the main wheel
uses traditional mode. This change inverts the default
direction of horizontal scrolling.
(cherry picked from commit
8490384c688f6e6045414991a17d2c4a69cec858)
MatchVendor=0x046D
MatchProduct=0x4011
AttrPalmPressureThreshold=400
+
+[Logitech MX Master 2S]
+MatchVendor=0x46D
+MatchProduct=0x4069
+ModelInvertHorizontalScrolling=1
+
+[Logitech MX Master 3]
+MatchVendor=0x46D
+MatchProduct=0x4082
+ModelInvertHorizontalScrolling=1
struct normalized_coords delta = *delta_in;
struct discrete_coords discrete = *discrete_in;
+ if (device->scroll.invert_horizontal_scrolling) {
+ delta.x *= -1;
+ discrete.x *= -1;
+ }
+
if (device->scroll.natural_scrolling_enabled) {
delta.x *= -1;
delta.y *= -1;
return NULL;
}
+ if (evdev_device_has_model_quirk(device, QUIRK_MODEL_INVERT_HORIZONTAL_SCROLLING)) {
+ device->scroll.invert_horizontal_scrolling = true;
+ }
+
return fallback_dispatch_create(&device->base);
}
* used at runtime to enable/disable the feature */
bool natural_scrolling_enabled;
+ /* set during device init to invert direction of
+ * horizontal scrolling */
+ bool invert_horizontal_scrolling;
+
/* angle per REL_WHEEL click in degrees */
struct wheel_angle wheel_click_angle;
case QUIRK_MODEL_HP_PAVILION_DM4_TOUCHPAD: return "ModelHPPavilionDM4Touchpad";
case QUIRK_MODEL_HP_STREAM11_TOUCHPAD: return "ModelHPStream11Touchpad";
case QUIRK_MODEL_HP_ZBOOK_STUDIO_G3: return "ModelHPZBookStudioG3";
+ case QUIRK_MODEL_INVERT_HORIZONTAL_SCROLLING: return "ModelInvertHorizontalScrolling";
case QUIRK_MODEL_LENOVO_L380_TOUCHPAD: return "ModelLenovoL380Touchpad";
case QUIRK_MODEL_LENOVO_SCROLLPOINT: return "ModelLenovoScrollPoint";
case QUIRK_MODEL_LENOVO_T450_TOUCHPAD: return "ModelLenovoT450Touchpad";
QUIRK_MODEL_HP_PAVILION_DM4_TOUCHPAD,
QUIRK_MODEL_HP_STREAM11_TOUCHPAD,
QUIRK_MODEL_HP_ZBOOK_STUDIO_G3,
+ QUIRK_MODEL_INVERT_HORIZONTAL_SCROLLING,
QUIRK_MODEL_LENOVO_L380_TOUCHPAD,
QUIRK_MODEL_LENOVO_SCROLLPOINT,
QUIRK_MODEL_LENOVO_T450_TOUCHPAD,