I used to use synclient to configure taps for only a single button. I find two
and three button taps problematic, resulting in crazy highlighting and
pasting. New computer uses wstpad, however, so there's no more synclient.

Patch below changes wstpad to only report button clicks for single taps. Two
and three finger taps are ignored. I was hoping to make this configurable by
setting mouse.tp.tapping to a bitmask, but tapping is already a flag in a bit
mask, and some of the needed info seems to get lost before making it to the
last function.

As a quick hack, I just changed tap_btn to return the answer I wanted. This is
obviously suboptimal, though.


Index: wstpad.c
===================================================================
RCS file: /home/cvs/src/sys/dev/wscons/wstpad.c,v
retrieving revision 1.22
diff -u -p -r1.22 wstpad.c
--- wstpad.c    29 Dec 2018 21:03:58 -0000      1.22
+++ wstpad.c    2 Mar 2019 07:04:53 -0000
@@ -693,6 +693,10 @@ tap_btn(struct wstpad *tp, int nmasked)
 {
        int n = tp->tap.contacts - nmasked;
 
+       if (n == 1)
+               return LEFTBTN;
+       return 0;
+
        return (n == 2 ? RIGHTBTN : (n == 3 ? MIDDLEBTN : LEFTBTN));
 }
 

Reply via email to