Date: Sun, 18 Apr 2021 22:49:59 +0200 From: Michael Gmelin <freebsd@grem.de> To: Ronald Klop <ronald-lists@klop.ws> Cc: Michael Gmelin <freebsd@grem.de>, freebsd-x11@freebsd.org Subject: Re: (solved) Re: mouse scrolling activates back/forward in browser Message-ID: <20210418224959.1343d2f5@bsd64.grem.de> In-Reply-To: <47e51983-b83f-8248-29ad-c23db2523610@klop.ws> References: <dcef9454-285c-fa97-ed42-4b15b74cd77c@klop.ws> <806D1887-2275-48C5-9CA4-715E3F57C6DB@grem.de> <47e51983-b83f-8248-29ad-c23db2523610@klop.ws>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 16 Apr 2021 21:38:29 +0200 Ronald Klop <ronald-lists@klop.ws> wrote: > On 4/16/21 9:14 PM, Michael Gmelin wrote: > >=20 > > =20 > >> On 16. Apr 2021, at 21:05, Ronald Klop <ronald-lists@klop.ws> > >> wrote: > >> > >> =EF=BB=BFOn 4/15/21 9:11 PM, Michael Gmelin wrote: =20 > >>>>> On 15. Apr 2021, at 20:54, Ronald Klop <ronald-lists@klop.ws> > >>>>> wrote: =20 > >>>> > >>>> =EF=BB=BFOn 4/15/21 9:53 AM, Ronald Klop wrote: =20 > >>>>> Hi, > >>>>> When I use the scrollwheel of the mouse my browser triggers > >>>>> back/forward. What happens is this: If I scroll up (button 4) > >>>>> after scrolling down (button 5) it triggers button 8 and 9. I > >>>>> see it generating a ButtonPress 8/9 if I go down and than up. > >>>>> And a ButtonRelease 8/9 if I first go up and than down. I have > >>>>> no config in /etc/X11. Xorg logs: > >>>>> https://www.klop.ws/Xorg.0.log This happens on the trackpad of > >>>>> the laptop and with a bluetooth connected mouse. What makes it > >>>>> a little more complex is that this is running FreeBSD 14 in > >>>>> VirtualBox on Windows 10 with. NB: It happened in Virtualbox 5 > >>>>> and now in 6 also. This started around a year ago. =20 > >>> That=E2=80=99s because we switched to udev/libinput by default around > >>> that time. =20 > >>>>> https://lists.freebsd.org/pipermail/freebsd-ports/2020-March/117879= .html > >>>>> But didn't have time to look into it. Any thoughts or similar > >>>>> experiences? Regards, > >>>>> Ronald. =20 > >>>> > >>>> > >>>> Some more googling found this: > >>>> https://forums.freebsd.org/threads/mouse-wheel-strange-behavior-with= -firefox.57494/ > >>>> > >>>> Just removed button 8 and 9. > >>>> xmodmap -e "pointer =3D 1 2 3 4 5 6 7 0 0 10 11 12" Hi Ronald, I could reproduce the issue in VirtualBox. When checking the output of `libinput debug-events' I can see button press and release events for BTN_SIDE and BTN_EXTRA (which maps to back and forward by default) every time scrolling changes direction. After that, the proper AXIS events are shown. Scrolling left and right also emits those events - therefore X11 sees button 8 and 9 instead of buttons 6 and 7. So far so good. The problem also happens when an evdev driver is used, so it's not a libinput problem. Instead of removing buttons with xmodmap, you can also use xinput set-button-map "IntelliMouse Explorer" 1 2 3 4 5 6 7 0 0 e.g., in ~/.xinitrc, the effect is the same. An alternative approach is to change virtualbox to use the USB Tablet driver: VBoxManage modifyvm "VM Name" --mouse usbtablet (or using the VirtualBox GUI) and then, inside the VM, do: pkg install utouch-kmod xf86-input-evdev echo "utouch_load=3DYES" >>/boot/loader.conf Create a file called /usr/local/etc/X11/xorg.d/99-vbox.conf, containing: Section "InputClass" Identifier "VirtualBox Mouse" MatchIsTouchscreen "on" MatchDevicePath "/dev/input/event*" Driver "evdev" EndSection and reboot, then start X. (in case you're not rebooting, do "kldload utouch; kldunload uhid"). You also need to make sure that Mouse Integration is enabled in VirtualBox. This will essentially have the same net-result: Vertical scrolling works okay, no forward/back button issues, no horizontal scrolling. So it's not necessarily worth the trouble, but I wanted to document it anyway for future reference. Ideally, there would be a solution that would allow the mouse to actually emit horizontal scroll events. I suspect that the reason why this isn't working with PS/2 emulation is in our IntelliMouse Explorer driver, but I don't know for sure. Best, Michael --=20 Michael Gmelin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210418224959.1343d2f5>