mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-08 07:48:03 +02:00
evdev: if a keyboard has a scroll wheel, allow natural scrolling
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
55823f2350
commit
e2f61b8fb7
1 changed files with 5 additions and 0 deletions
|
|
@ -1679,6 +1679,11 @@ evdev_configure_device(struct evdev_device *device)
|
||||||
log_info(libinput,
|
log_info(libinput,
|
||||||
"input device '%s', %s is a keyboard\n",
|
"input device '%s', %s is a keyboard\n",
|
||||||
device->devname, devnode);
|
device->devname, devnode);
|
||||||
|
|
||||||
|
/* want natural-scroll config option */
|
||||||
|
if (libevdev_has_event_code(evdev, EV_REL, REL_WHEEL) ||
|
||||||
|
libevdev_has_event_code(evdev, EV_REL, REL_HWHEEL))
|
||||||
|
device->scroll.natural_scrolling_enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (udev_tags & EVDEV_UDEV_TAG_TOUCHSCREEN) {
|
if (udev_tags & EVDEV_UDEV_TAG_TOUCHSCREEN) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue