[xf86-input-libinput] evdev like EmulateWheel?
Peter Hutterer
peter.hutterer at who-t.net
Sun May 27 22:24:25 UTC 2018
On Fri, May 25, 2018 at 12:15:00PM +0300, Alon Bar-Lev wrote:
> Hello,
>
> I am trying to migrate from evdev configuration which works fine recent
> years to libinput configuration.
>
> Functionality: When middle bottom is pressed and primary pointer is moved
> up/down a scroll events are sent, while if bottom is pressed shortly it
> acts as middle button (paste).
>
> Use cases:
> 1. Track point support: middle button + movement in trackpoint = scroll
> 2. Any mouse configuration, in this case the track point is exposed to the
> Linux as USB tablet mouse, however, functionality should remain.
>
> The current evdev configuration which is working fine:
> ---
> Section "InputClass"
> Identifier "MyMouse"
> MatchProduct "VirtualBox USB Tablet"
> MatchIsPointer "on"
> Option "EmulateWheel"
> Option "EmulateWheelButton" "2"
> Option "EmulateWheelInertia" "500"
> EndSection
> ---
>
> I tried the following configuration, with and without the ScrollMethod
> properties:
> ---
> Section "InputClass"
> Identifier "MyMouse"
> MatchProduct "VirtualBox USB Tablet"
> MatchIsPointer "on"
> Option "NaturalScrolling" "true"
> Option "ScrollMethod" "button"
> Option "ScrollButton" "2"
> EndSection
that should work, but judging by the list-props output the scroll method
isn't available on that device. You can verify this with sudo libinput
list-devices. The VirtualBox device is a special device though and often
falls through the cracks because it's different to most physical devices.
Either way, fixable, please file a bug against libinput, thanks.
https://wayland.freedesktop.org/libinput/doc/latest/reporting_bugs.html
Cheers,
Peter
> ---
>
> However, I get no affect in xinput, nor do I see difference if I manually
> set "libinput Natural Scrolling Enabled" property.
>
> ---
> localhost ~ # xinput
> ⎡ Virtual core pointer id=2 [master pointer
> (3)]
> ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer
> (2)]
> ⎜ ↳ VirtualBox mouse integration id=8 [slave pointer
> (2)]
> ⎜ ↳ VirtualBox USB Tablet id=9 [slave pointer
> (2)]
> ⎣ Virtual core keyboard id=3 [master keyboard
> (2)]
> ↳ Virtual core XTEST keyboard id=5 [slave keyboard
> (3)]
> ↳ Power Button id=6 [slave keyboard
> (3)]
> ↳ Sleep Button id=7 [slave keyboard
> (3)]
> ↳ AT Translated Set 2 keyboard id=10 [slave keyboard
> (3)]
>
> localhost ~ # xinput --list-props "VirtualBox USB Tablet"
> Device 'VirtualBox USB Tablet':
> Device Enabled (116): 1
> Coordinate Transformation Matrix (118): 1.000000, 0.000000,
> 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
> libinput Natural Scrolling Enabled (253): 0
> libinput Natural Scrolling Enabled Default (254): 0
> libinput Middle Emulation Enabled (261): 0
> libinput Middle Emulation Enabled Default (262): 0
> libinput Calibration Matrix (255): 1.000000, 0.000000,
> 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
> libinput Calibration Matrix Default (256): 1.000000, 0.000000,
> 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
> libinput Left Handed Enabled (257): 0
> libinput Left Handed Enabled Default (258): 0
> libinput Send Events Modes Available (236): 1, 0
> libinput Send Events Mode Enabled (237): 0, 0
> libinput Send Events Mode Enabled Default (238): 0, 0
> Device Node (239): "/dev/input/event3"
> Device Product ID (240): 33006, 33
> libinput Drag Lock Buttons (259): <no items>
> libinput Horizontal Scroll Enabled (260): 1
> ---
>
> Any suggestion?
> For now I revert to the old eudev driver.
>
> Thanks!
> Alon
>
> Relevant Xorg log:
> ---
> [ 6569.289] (II) LoadModule: "libinput"
> [ 6569.289] (II) Loading /usr/lib64/xorg/modules/input/libinput_drv.so
> [ 6569.289] (II) Module libinput: vendor="X.Org Foundation"
> [ 6569.289] compiled for 1.19.5, module version = 0.27.1
> [ 6569.289] Module class: X.Org XInput Driver
> [ 6569.289] ABI class: X.Org XInput driver, version 24.1
> [ 6569.322] (II) config/udev: getting attribute name on (null) returned
> "VirtualBox USB Tablet"
> [ 6569.322] (II) config/udev: getting property PRODUCT on (null) returned
> "3/80ee/21/110"
> [ 6569.322] (II) config/udev: getting property ID_INPUT.tags on
> /dev/input/event3 returned "(null)"
> [ 6569.322] (II) config/udev: getting property ID_INPUT_MOUSE on
> /dev/input/event3 returned "1"
> [ 6569.322] (II) config/udev: getting property ID_VENDOR on
> /dev/input/event3 returned "VirtualBox"
> [ 6569.322] (II) config/udev: Adding input device VirtualBox USB Tablet
> (/dev/input/event3)
> [ 6569.322] (**) VirtualBox USB Tablet: Applying InputClass "evdev pointer
> catchall"
> [ 6569.324] (**) VirtualBox USB Tablet: Applying InputClass "libinput
> pointer catchall"
> [ 6569.324] (**) VirtualBox USB Tablet: Applying InputClass "MyMouse"
> [ 6569.324] (II) Using input driver 'libinput' for 'VirtualBox USB Tablet'
> [ 6569.324] Option "_source" "server/udev"
> [ 6569.324] Option "name" "VirtualBox USB Tablet"
> [ 6569.324] Option "path" "/dev/input/event3"
> [ 6569.324] Option "device" "/dev/input/event3"
> [ 6569.324] Option "major" "13"
> [ 6569.324] Option "minor" "67"
> [ 6569.324] Option "config_info"
> "udev:/sys/devices/pci0000:00/0000:00:0c.0/usb1/1-1/1-1:1.0/0003:80EE:0021.0001/input/input4/event3"
> [ 6569.324] Option "driver" "libinput"
> [ 6569.324] Option "NaturalScrolling" "true"
> [ 6569.324] Option "ScrollMethod" "button"
> [ 6569.324] Option "ScrollButton" "2"
> [ 6569.324] (**) VirtualBox USB Tablet: always reports core events
> [ 6569.324] (**) Option "Device" "/dev/input/event3"
> [ 6569.324] (**) Option "_source" "server/udev"
> [ 6569.324] (**) Option "Device" "/dev/input/event3"
> [ 6569.378] (II) event3 - VirtualBox USB Tablet: is tagged by udev as:
> Mouse
> [ 6569.378] (II) event3 - VirtualBox USB Tablet: device is a pointer
> [ 6569.378] (II) event3 - VirtualBox USB Tablet: device removed
> [ 6569.392] (**) Option "NaturalScrolling" "true"
> [ 6569.392] (**) Option "config_info"
> "udev:/sys/devices/pci0000:00/0000:00:0c.0/usb1/1-1/1-1:1.0/0003:80EE:0021.0001/input/input4/event3"
> [ 6569.392] (II) XINPUT: Adding extended input device "VirtualBox USB
> Tablet" (type: MOUSE, id 9)
> [ 6569.393] (**) Option "AccelerationScheme" "none"
> [ 6569.393] (**) VirtualBox USB Tablet: (accel) selected scheme none/0
> [ 6569.393] (**) VirtualBox USB Tablet: (accel) acceleration factor: 2.000
> [ 6569.393] (**) VirtualBox USB Tablet: (accel) acceleration threshold: 4
> [ 6569.393] (**) Option "Device" "/dev/input/event3"
> [ 6569.446] (II) event3 - VirtualBox USB Tablet: is tagged by udev as:
> Mouse
> [ 6569.446] (II) event3 - VirtualBox USB Tablet: device is a pointer
> [ 6569.446] (II) config/udev: getting attribute name on (null) returned
> "VirtualBox USB Tablet"
> [ 6569.446] (II) config/udev: getting property PRODUCT on (null) returned
> "3/80ee/21/110"
> [ 6569.447] (II) config/udev: getting property ID_INPUT.tags on
> /dev/input/js0 returned "(null)"
> [ 6569.447] (II) config/udev: getting property ID_INPUT_MOUSE on
> /dev/input/js0 returned "1"
> [ 6569.447] (II) config/udev: getting property ID_VENDOR on /dev/input/js0
> returned "VirtualBox"
> [ 6569.447] (II) config/udev: Adding input device VirtualBox USB Tablet
> (/dev/input/js0)
> [ 6569.447] (**) VirtualBox USB Tablet: Applying InputClass "MyMouse"
> [ 6569.447] (II) No input driver specified, ignoring this device.
> [ 6569.447] (II) This device may have been added with another device file.
> [ 6569.447] (II) config/udev: getting attribute name on (null) returned
> "VirtualBox USB Tablet"
> ---
> _______________________________________________
> xorg at lists.x.org: X.Org support
> Archives: http://lists.freedesktop.org/archives/xorg
> Info: https://lists.x.org/mailman/listinfo/xorg
> Your subscription address: %(user_address)s
>
More information about the xorg
mailing list