From 1130dff9d26aed381fa75fd10a455657410af169 Mon Sep 17 00:00:00 2001 From: Vladimir Kondratyev Date: Sun, 26 Apr 2020 20:06:08 +0000 Subject: [PATCH] psm(4): Fix wrong key-release event occuring after trackpoint use. Some models of laptops e.g. "X1 Carbon 3rd Gen Thinkpad" have LRM buttons wired as so called "Synaptic touchpads extended buttons" rather thah real trackpoint buttons. Handle this case with merging of events from both sources. PR: 245877 Reported by: Raichoo MFC after: 1 week --- sys/dev/atkbdc/psm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index cbdcc13a8b0..1010b977b54 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -3371,7 +3371,7 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *ms, evdev_push_rel(sc->evdev_r, REL_X, *x); evdev_push_rel(sc->evdev_r, REL_Y, -*y); evdev_push_mouse_btn(sc->evdev_r, - guest_buttons); + guest_buttons | sc->extended_buttons); evdev_sync(sc->evdev_r); } #endif