From 18d8a1f91c6982e07e53dc21dde6c944f4ca326a Mon Sep 17 00:00:00 2001 From: b-aaz <85005689+b-aaz@users.noreply.github.com> Date: Sun, 14 Jun 2026 18:00:40 +0000 Subject: [PATCH] psm(4): Disabled IMEX side-buttons by default. This is a workaround. At least two hypervisors (QEMU and VBox) are detected to be using this mouse model by default and they send superfluous side button key events when using the scroll wheel. Added a runtime rw sysctl that disables the side buttons on this specific model to workaround this issue. Signed-off-by: b-aaz --- sys/dev/atkbdc/psm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index a2fc68d0f52a..0d05ae54ffd0 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -531,6 +531,7 @@ static int verbose = PSM_DEBUG; static int synaptics_support = 1; static int trackpoint_support = 1; static int elantech_support = 1; +static int explorer_sidebuttons = 0; static int mux_disabled = -1; /* for backward compatibility */ @@ -2991,6 +2992,9 @@ SYSCTL_INT(_hw_psm, OID_AUTO, trackpoint_support, CTLFLAG_RDTUN, SYSCTL_INT(_hw_psm, OID_AUTO, elantech_support, CTLFLAG_RDTUN, &elantech_support, 0, "Enable support for Elantech touchpads"); +SYSCTL_INT(_hw_psm, OID_AUTO, explorer_sidebuttons, CTLFLAG_RW, + &explorer_sidebuttons, 0, "Enable support for Intellimouse Explorer side buttons"); + SYSCTL_INT(_hw_psm, OID_AUTO, mux_disabled, CTLFLAG_RDTUN, &mux_disabled, 0, "Disable active multiplexing"); @@ -4998,6 +5002,10 @@ psmsoftintr(void *arg) z = (pb->ipacket[3] & MOUSE_EXPLORER_ZNEG) ? (pb->ipacket[3] & 0x0f) - 16 : (pb->ipacket[3] & 0x0f); + if (!explorer_sidebuttons) + { + break; + } ms.button |= (pb->ipacket[3] & MOUSE_EXPLORER_BUTTON4DOWN) ? MOUSE_BUTTON4DOWN : 0;