Re: wsconsctl.conf: mention mouse.tp.tapping in example

2021-03-24 Thread Raf Czlonka
On Wed, Mar 24, 2021 at 01:42:19PM GMT, Klemens Nanni wrote:
> On Tue, Mar 23, 2021 at 12:41:25PM +, Raf Czlonka wrote:
> > According to wsmouse(4), the orders is as follows:
> > 
> > This list of three parameters configures these mappings,
> > in the order:
> > 
> >one-finger,two-finger,three-finger
> > 
> > Setting a parameter to a positive value enables that tap
> > gesture and maps it to the given mouse button.  To disable
> > all three tap gestures at once, provide the single value
> > of 0.  Conversely, a single non-zero value will enable
> > one-finger, two-finger, and three-finger tap gestures with
> > their default mappings of left button, right button, and
> > middle button, respectively.
> I had to let this be for a day and reread it now.

Hi Klemens,

No worries - I had to re-read your patch and the man page several
times just to be sure I got it right ;^)

> > Your updated patch reads:
> > 
> > #mouse.tp.tapping=0 # 1,3,2=interpret one/three/two (simultaneous) 
> > # tap(s) as left/middle/right mouse button click
> > 
> > Whilst technically correct, if I'm reading the man page correctly,
> > it is a little bit confusing as the gestures are out of order and
> > the digits look like they represent the number of fingers when, in
> > reality, they represent the mouse *buttons* so, unless I got totally
> > confused by either of the above, or am missing something altogether,
> > the patch should probably read:
> > 
> > #mouse.tp.tapping=1 # 1,3,2=interpret one/two/three (simultaneous) 
> > # tap(s) as left/right/middle mouse button click
> > 
> > As it is clear that digits do not map to numerals.
> So yes, you're right.

I suggested "1" instead of "0" on purpose, as it would match the
comment/description. As per the man page, "0" disable all tap gestures.

Regards,

Raf

> Anyone willing to OK this?
> 
> Index: wsconsctl.conf
> ===
> RCS file: /cvs/src/etc/examples/wsconsctl.conf,v
> retrieving revision 1.1
> diff -u -p -r1.1 wsconsctl.conf
> --- wsconsctl.conf16 Jul 2014 13:21:33 -  1.1
> +++ wsconsctl.conf24 Mar 2021 13:40:02 -
> @@ -9,3 +9,5 @@
>  #display.vblank=on   # enable vertical sync blank for screen burner
>  #display.screen_off=6# set screen burner timeout to 60 seconds
>  #display.msact=off   # disable screen unburn w/ mouse
> +#mouse.tp.tapping=0  # 1,3,2=interpret one-/two-/three-finger taps as
> + # 1st/3rd/2nd, i.e. left/right/middle button 
> click



Re: wsconsctl.conf: mention mouse.tp.tapping in example

2021-03-24 Thread Klemens Nanni
On Tue, Mar 23, 2021 at 12:41:25PM +, Raf Czlonka wrote:
> According to wsmouse(4), the orders is as follows:
> 
>   This list of three parameters configures these mappings,
>   in the order:
> 
>one-finger,two-finger,three-finger
> 
>   Setting a parameter to a positive value enables that tap
>   gesture and maps it to the given mouse button.  To disable
>   all three tap gestures at once, provide the single value
>   of 0.  Conversely, a single non-zero value will enable
>   one-finger, two-finger, and three-finger tap gestures with
>   their default mappings of left button, right button, and
>   middle button, respectively.
I had to let this be for a day and reread it now.

> Your updated patch reads:
> 
>   #mouse.tp.tapping=0 # 1,3,2=interpret one/three/two (simultaneous) 
>   # tap(s) as left/middle/right mouse button click
> 
> Whilst technically correct, if I'm reading the man page correctly,
> it is a little bit confusing as the gestures are out of order and
> the digits look like they represent the number of fingers when, in
> reality, they represent the mouse *buttons* so, unless I got totally
> confused by either of the above, or am missing something altogether,
> the patch should probably read:
> 
>   #mouse.tp.tapping=1 # 1,3,2=interpret one/two/three (simultaneous) 
>   # tap(s) as left/right/middle mouse button click
> 
> As it is clear that digits do not map to numerals.
So yes, you're right.

Anyone willing to OK this?

Index: wsconsctl.conf
===
RCS file: /cvs/src/etc/examples/wsconsctl.conf,v
retrieving revision 1.1
diff -u -p -r1.1 wsconsctl.conf
--- wsconsctl.conf  16 Jul 2014 13:21:33 -  1.1
+++ wsconsctl.conf  24 Mar 2021 13:40:02 -
@@ -9,3 +9,5 @@
 #display.vblank=on # enable vertical sync blank for screen burner
 #display.screen_off=6  # set screen burner timeout to 60 seconds
 #display.msact=off # disable screen unburn w/ mouse
+#mouse.tp.tapping=0# 1,3,2=interpret one-/two-/three-finger taps as
+   # 1st/3rd/2nd, i.e. left/right/middle button 
click



Re: wsconsctl.conf: mention mouse.tp.tapping in example

2021-03-23 Thread Ulf Brosziewski
On 3/23/21 8:31 PM, Klemens Nanni wrote:
> On Tue, Mar 23, 2021 at 05:52:10PM +0100, Ulf Brosziewski wrote:
>> Thanks for the report.  The logging shows that the contacts are recognized,
>> so we have indeed to look at the filters of the driver.  Two filters are
>> relevant here:  The first and essential one checks whether the duration of
>> a contact exceeds the "tapping timeout" (180ms by default).  The second
>> one discards contacts which are "too far" away from their initial position
>> (in order to distinguish a short movement sequence from a tap gesture).
>>
>> Could you test whether the patch below helps, at least on the Thinkpad?
>> It makes the second filter less restrictive (plainly, it won't apply to
>> multi-finger taps).
> That diff makes double and triple taps work reliably on the Thinkpad!

The patch is waiting for an OK ;-)

As to the parameter number, it's 137, not 173.  Sorry for that
misinformation.

> No idea if relevant but two finger scroll also still works, regardless
> of the `moues.tp.tapping' value.
> 
> Will try the Pinebook later.
> 
>> As to the timeout, the "timestamp" values in the Pinebook output show some
>> large gaps.  Are the sequences complete?
> In what sense?  I copied the text as-is from `tail -f /var/log/messages'
> explicitly hitting enter between each tap exercise to separate them.
> 
> So each paste should be as they came out of the driver, without
> intermangled lines from previous or next tap exercises.
> 
>> Do you have the habit of tapping very slowly?
> I'd say those are fast taps, I can hardly do them any faster;
> certainly no resting on the touchpad.
> 
> Have you observed timing-related problems on that machine?
> Yes, but only with playing audio:  it's too fast and high pitched,
> kettenis said there might be a clock or rkiis(4) related problem.
> 
> I couldn't come up with anything in that regard so far.
> 
>> The four-digit numbers in the log lines represent the current low-precision
>> time in milliseconds modulo 1. For example, this sequence
>>  [wsmouse0-in][4275] abs:636,444 mt:0x01:0
>>  [wsmouse0-in][4556] mt:0x00:-1
>> would indicate that the duration of the contact was about 4556-4275
>> milliseconds, which exceeds the default timeout by far.  If this happens
>> often, there might be some hardware problem.
>>
>> You could try to mitigate a timeout problem by increasing the threshold
>> to, e.g., 250ms by issuing the command
>> $ doas wsconsctl mouse.param=173:250
>> but I would recommend to keep it within reasonable limits.
> 
>   $ doas wsconsctl mouse.param=173:250
>   wsconsctl: invalid input (param)
> 
>> Index: dev/wscons/wstpad.c
>> ===
>> RCS file: /cvs/src/sys/dev/wscons/wstpad.c,v
>> retrieving revision 1.28
>> diff -u -p -r1.28 wstpad.c
>> --- dev/wscons/wstpad.c  21 Mar 2021 16:20:49 -  1.28
>> +++ dev/wscons/wstpad.c  23 Mar 2021 09:09:42 -
>> @@ -657,14 +657,8 @@ wstpad_is_tap(struct wstpad *tp, struct
>>  struct timespec ts;
>>  int dx, dy, dist = 0;
>>
>> -/*
>> - * No distance limit applies if there has been more than one contact
>> - * on a single-touch device.  We cannot use (t->x - t->orig.x) in this
>> - * case.  Accumulated deltas might be an alternative, but some
>> - * touchpads provide unreliable coordinates at the start or end of a
>> - * multi-finger touch.
>> - */
>> -if (IS_MT(tp) || tp->tap.contacts < 2) {
>> +/* Try to distinguish one-finger taps from short movements. */
>> +if (tp->tap.contacts == (tp->ignore ? 2 : 1)) {
>>  dx = abs(t->x - t->orig.x) << 12;
>>  dy = abs(t->y - t->orig.y) * tp->ratio;
>>  dist = (dx >= dy ? dx + 3 * dy / 8 : dy + 3 * dx / 8);
>>



Re: wsconsctl.conf: mention mouse.tp.tapping in example

2021-03-23 Thread Klemens Nanni
On Tue, Mar 23, 2021 at 05:52:10PM +0100, Ulf Brosziewski wrote:
> Thanks for the report.  The logging shows that the contacts are recognized,
> so we have indeed to look at the filters of the driver.  Two filters are
> relevant here:  The first and essential one checks whether the duration of
> a contact exceeds the "tapping timeout" (180ms by default).  The second
> one discards contacts which are "too far" away from their initial position
> (in order to distinguish a short movement sequence from a tap gesture).
> 
> Could you test whether the patch below helps, at least on the Thinkpad?
> It makes the second filter less restrictive (plainly, it won't apply to
> multi-finger taps).
That diff makes double and triple taps work reliably on the Thinkpad!
No idea if relevant but two finger scroll also still works, regardless
of the `moues.tp.tapping' value.

Will try the Pinebook later.

> As to the timeout, the "timestamp" values in the Pinebook output show some
> large gaps.  Are the sequences complete?
In what sense?  I copied the text as-is from `tail -f /var/log/messages'
explicitly hitting enter between each tap exercise to separate them.

So each paste should be as they came out of the driver, without
intermangled lines from previous or next tap exercises.

> Do you have the habit of tapping very slowly?
I'd say those are fast taps, I can hardly do them any faster;
certainly no resting on the touchpad.

Have you observed timing-related problems on that machine?
Yes, but only with playing audio:  it's too fast and high pitched,
kettenis said there might be a clock or rkiis(4) related problem.

I couldn't come up with anything in that regard so far.

> The four-digit numbers in the log lines represent the current low-precision
> time in milliseconds modulo 1. For example, this sequence
>   [wsmouse0-in][4275] abs:636,444 mt:0x01:0
>   [wsmouse0-in][4556] mt:0x00:-1
> would indicate that the duration of the contact was about 4556-4275
> milliseconds, which exceeds the default timeout by far.  If this happens
> often, there might be some hardware problem.
> 
> You could try to mitigate a timeout problem by increasing the threshold
> to, e.g., 250ms by issuing the command
> $ doas wsconsctl mouse.param=173:250
> but I would recommend to keep it within reasonable limits.

$ doas wsconsctl mouse.param=173:250
wsconsctl: invalid input (param)

> Index: dev/wscons/wstpad.c
> ===
> RCS file: /cvs/src/sys/dev/wscons/wstpad.c,v
> retrieving revision 1.28
> diff -u -p -r1.28 wstpad.c
> --- dev/wscons/wstpad.c   21 Mar 2021 16:20:49 -  1.28
> +++ dev/wscons/wstpad.c   23 Mar 2021 09:09:42 -
> @@ -657,14 +657,8 @@ wstpad_is_tap(struct wstpad *tp, struct
>   struct timespec ts;
>   int dx, dy, dist = 0;
> 
> - /*
> -  * No distance limit applies if there has been more than one contact
> -  * on a single-touch device.  We cannot use (t->x - t->orig.x) in this
> -  * case.  Accumulated deltas might be an alternative, but some
> -  * touchpads provide unreliable coordinates at the start or end of a
> -  * multi-finger touch.
> -  */
> - if (IS_MT(tp) || tp->tap.contacts < 2) {
> + /* Try to distinguish one-finger taps from short movements. */
> + if (tp->tap.contacts == (tp->ignore ? 2 : 1)) {
>   dx = abs(t->x - t->orig.x) << 12;
>   dy = abs(t->y - t->orig.y) * tp->ratio;
>   dist = (dx >= dy ? dx + 3 * dy / 8 : dy + 3 * dx / 8);
> 



Re: wsconsctl.conf: mention mouse.tp.tapping in example

2021-03-23 Thread Ulf Brosziewski
Thanks for the report.  The logging shows that the contacts are recognized,
so we have indeed to look at the filters of the driver.  Two filters are
relevant here:  The first and essential one checks whether the duration of
a contact exceeds the "tapping timeout" (180ms by default).  The second
one discards contacts which are "too far" away from their initial position
(in order to distinguish a short movement sequence from a tap gesture).

Could you test whether the patch below helps, at least on the Thinkpad?
It makes the second filter less restrictive (plainly, it won't apply to
multi-finger taps).

As to the timeout, the "timestamp" values in the Pinebook output show some
large gaps.  Are the sequences complete?  Do you have the habit of tapping
very slowly?  Have you observed timing-related problems on that machine?

The four-digit numbers in the log lines represent the current low-precision
time in milliseconds modulo 1. For example, this sequence
[wsmouse0-in][4275] abs:636,444 mt:0x01:0
[wsmouse0-in][4556] mt:0x00:-1
would indicate that the duration of the contact was about 4556-4275
milliseconds, which exceeds the default timeout by far.  If this happens
often, there might be some hardware problem.

You could try to mitigate a timeout problem by increasing the threshold
to, e.g., 250ms by issuing the command
$ doas wsconsctl mouse.param=173:250
but I would recommend to keep it within reasonable limits.


On 3/23/21 12:26 PM, Klemens Nanni wrote:
> On Tue, Mar 23, 2021 at 02:00:43AM +0100, Ulf Brosziewski wrote:
>> On 3/22/21 10:19 PM, Klemens Nanni wrote:
>>> On Mon, Mar 22, 2021 at 08:18:45PM +0100, Klemens Nanni wrote:
 I was too stupid to look at `wsconsctl' output (which needs root) and
 only looked here.

 Mailing the diff for my lack of better wording, plus the knob atually
 takes three values which I have yet to decode by reading wsconsctl(8)
 code.
>>> The reason I had to look is because the (default) functionality does not
>>> work reliably at all:
>>>
>>> $ doas wsconsctl mouse.tp.tapping=1
>>> mouse.tp.tapping -> 1,3,2
>>>
>>> Single taps are always detected reliably and deliver left mouse button
>>> clicks, but tripple and double taps for middle and right mouse button
>>> clicks work are recognised so poorly that I first though multitouch
>>> support wasn't there at all.
>>
>> Can you tell whether that's a hardware or a driver problem?
> I'd assume it's a driver a problem since I get the exact same behaviour
> on both a Pinebook Pro and a Thinkpad X230.
> 
>> wsmouse logging might be helpful here. You could enable it by
>> $ doas wsconsctl mouse.param=256:1,257:1
>> , make a few two-finger taps, and deactivate it with
>> $ doas wsconsctl mouse.param=256:0,257:0
>> For the output:
>> $ grep 'wsmouse0-' /var/log/messages
> Thanks!  Here goes the Pinebook Pro:
> 
> One-finger tap:
>   [wsmouse0-in][4275] abs:636,444 mt:0x01:0
>   [wsmouse0-in][4556] mt:0x00:-1
> 
> Two-finger tap:
>   [wsmouse0-in][0319] abs:786,516 mt:0x01:0
>   [wsmouse0-in][0329] mt:0x03:0
>   [wsmouse0-in][0772] abs:652,270 mt:0x02:1
> 
> Three-finger tap:
>   [wsmouse0-in][8821] abs:942,561 mt:0x01:0
>   [wsmouse0-in][8831] mt:0x03:0
>   [wsmouse0-in][8842] mt:0x07:0
>   [wsmouse0-in][8852] abs:942,563
>   [wsmouse0-in][9434] mt:0x05:0
>   [wsmouse0-in][9455] abs:539,210 mt:0x04:2
> 
> Only the one-finger tap does a left click, the others do nothing.
> 
> Double two-finger tap:
>   [wsmouse0-in][1894] abs:740,312 mt:0x01:0
>   [wsmouse0-in][1894] mt:0x03:0
>   [wsmouse0-in][2035] abs:554,44 mt:0x02:1
>   [wsmouse0-in][2045] mt:0x00:-1
>   [wsmouse0-ev][2045] 5:2 18:0
>   [wsmouse0-in][2055] abs:744,344 mt:0x01:0
>   [wsmouse0-ev][2055] 4:2 18:0
>   [wsmouse0-in][2065] mt:0x03:0
>   [wsmouse0-in][2497] abs:555,67 mt:0x02:1
> 
> This delivers a right-click in almost all attempts (this is the log of a
> successful one).
> 
> Touble three-finger tap:
> 
>   [wsmouse0-in][7276] abs:1114,734 mt:0x01:0
>   [wsmouse0-in][7286] mt:0x03:0
>   [wsmouse0-in][7296] mt:0x07:0
>   [wsmouse0-in][7427] abs:769,543 mt:0x06:1
>   [wsmouse0-in][7437] abs:468,284 mt:0x04:2
>   [wsmouse0-in][7437] mt:0x00:-1
>   [wsmouse0-ev][7437] 5:1 18:0
>   [wsmouse0-in][7447] abs:476,238 mt:0x01:0
>   [wsmouse0-ev][7447] 4:1 18:0
>   [wsmouse0-in][7457] abs:476,239
>   [wsmouse0-in][7467] mt:0x03:0
>   [wsmouse0-in][7477] mt:0x07:0
>   [wsmouse0-in][7648] abs:1121,718 mt:0x06:1
>   [wsmouse0-in][7658] abs:761,521 mt:0x04:2
> 
[...]


Index: dev/wscons/wstpad.c
===
RCS file: /cvs/src/sys/dev/wscons/wstpad.c,v
retrieving revision 1.28
diff -u -p -r1.28 wstpad.c
--- dev/wscons/wstpad.c 21 Mar 2021 16:20:49 -  1.28
+++ dev/wscons/wstpad.c 23 Mar 2021 09:09:42 -
@@ -657,14 +657,8 

Re: wsconsctl.conf: mention mouse.tp.tapping in example

2021-03-23 Thread Raf Czlonka
On Tue, Mar 23, 2021 at 11:26:19AM GMT, Klemens Nanni wrote:
> On Tue, Mar 23, 2021 at 02:00:43AM +0100, Ulf Brosziewski wrote:
> > On 3/22/21 10:19 PM, Klemens Nanni wrote:
> > > On Mon, Mar 22, 2021 at 08:18:45PM +0100, Klemens Nanni wrote:
> > >> I was too stupid to look at `wsconsctl' output (which needs root) and
> > >> only looked here.
> > >>
> > >> Mailing the diff for my lack of better wording, plus the knob atually
> > >> takes three values which I have yet to decode by reading wsconsctl(8)
> > >> code.
> > > The reason I had to look is because the (default) functionality does not
> > > work reliably at all:
> > > 
> > >   $ doas wsconsctl mouse.tp.tapping=1
> > >   mouse.tp.tapping -> 1,3,2
> > > 
> > > Single taps are always detected reliably and deliver left mouse button
> > > clicks, but tripple and double taps for middle and right mouse button
> > > clicks work are recognised so poorly that I first though multitouch
> > > support wasn't there at all.

Hi Klemens,

According to wsmouse(4), the orders is as follows:

This list of three parameters configures these mappings,
in the order:

   one-finger,two-finger,three-finger

Setting a parameter to a positive value enables that tap
gesture and maps it to the given mouse button.  To disable
all three tap gestures at once, provide the single value
of 0.  Conversely, a single non-zero value will enable
one-finger, two-finger, and three-finger tap gestures with
their default mappings of left button, right button, and
middle button, respectively.

Your updated patch reads:

#mouse.tp.tapping=0 # 1,3,2=interpret one/three/two (simultaneous) 
# tap(s) as left/middle/right mouse button click

Whilst technically correct, if I'm reading the man page correctly,
it is a little bit confusing as the gestures are out of order and
the digits look like they represent the number of fingers when, in
reality, they represent the mouse *buttons* so, unless I got totally
confused by either of the above, or am missing something altogether,
the patch should probably read:

#mouse.tp.tapping=1 # 1,3,2=interpret one/two/three (simultaneous) 
# tap(s) as left/right/middle mouse button click

As it is clear that digits do not map to numerals.

Regards,

Raf

> > Can you tell whether that's a hardware or a driver problem?
> I'd assume it's a driver a problem since I get the exact same behaviour
> on both a Pinebook Pro and a Thinkpad X230.
> 
> > wsmouse logging might be helpful here. You could enable it by
> > $ doas wsconsctl mouse.param=256:1,257:1
> > , make a few two-finger taps, and deactivate it with
> > $ doas wsconsctl mouse.param=256:0,257:0
> > For the output:
> > $ grep 'wsmouse0-' /var/log/messages
> Thanks!  Here goes the Pinebook Pro:
> 
> One-finger tap:
>   [wsmouse0-in][4275] abs:636,444 mt:0x01:0
>   [wsmouse0-in][4556] mt:0x00:-1
> 
> Two-finger tap:
>   [wsmouse0-in][0319] abs:786,516 mt:0x01:0
>   [wsmouse0-in][0329] mt:0x03:0
>   [wsmouse0-in][0772] abs:652,270 mt:0x02:1
> 
> Three-finger tap:
>   [wsmouse0-in][8821] abs:942,561 mt:0x01:0
>   [wsmouse0-in][8831] mt:0x03:0
>   [wsmouse0-in][8842] mt:0x07:0
>   [wsmouse0-in][8852] abs:942,563
>   [wsmouse0-in][9434] mt:0x05:0
>   [wsmouse0-in][9455] abs:539,210 mt:0x04:2
> 
> Only the one-finger tap does a left click, the others do nothing.
> 
> Double two-finger tap:
>   [wsmouse0-in][1894] abs:740,312 mt:0x01:0
>   [wsmouse0-in][1894] mt:0x03:0
>   [wsmouse0-in][2035] abs:554,44 mt:0x02:1
>   [wsmouse0-in][2045] mt:0x00:-1
>   [wsmouse0-ev][2045] 5:2 18:0
>   [wsmouse0-in][2055] abs:744,344 mt:0x01:0
>   [wsmouse0-ev][2055] 4:2 18:0
>   [wsmouse0-in][2065] mt:0x03:0
>   [wsmouse0-in][2497] abs:555,67 mt:0x02:1
> 
> This delivers a right-click in almost all attempts (this is the log of a
> successful one).
> 
> Touble three-finger tap:
> 
>   [wsmouse0-in][7276] abs:1114,734 mt:0x01:0
>   [wsmouse0-in][7286] mt:0x03:0
>   [wsmouse0-in][7296] mt:0x07:0
>   [wsmouse0-in][7427] abs:769,543 mt:0x06:1
>   [wsmouse0-in][7437] abs:468,284 mt:0x04:2
>   [wsmouse0-in][7437] mt:0x00:-1
>   [wsmouse0-ev][7437] 5:1 18:0
>   [wsmouse0-in][7447] abs:476,238 mt:0x01:0
>   [wsmouse0-ev][7447] 4:1 18:0
>   [wsmouse0-in][7457] abs:476,239
>   [wsmouse0-in][7467] mt:0x03:0
>   [wsmouse0-in][7477] mt:0x07:0
>   [wsmouse0-in][7648] abs:1121,718 mt:0x06:1
>   [wsmouse0-in][7658] abs:761,521 mt:0x04:2
> 
> This practically never delivers a middle click except when I'm lucky
> (this is the log of a successful one).
> 
>   [wsmouse0-in][0238] abs:1113,661 mt:0x01:0
>   [wsmouse0-in][0248] mt:0x03:0
>   [wsmouse0-in][0258] mt:0x07:0
>   [wsmouse0-in][0399] mt:0x05:0
>   

Re: wsconsctl.conf: mention mouse.tp.tapping in example

2021-03-23 Thread Klemens Nanni
On Tue, Mar 23, 2021 at 02:00:43AM +0100, Ulf Brosziewski wrote:
> On 3/22/21 10:19 PM, Klemens Nanni wrote:
> > On Mon, Mar 22, 2021 at 08:18:45PM +0100, Klemens Nanni wrote:
> >> I was too stupid to look at `wsconsctl' output (which needs root) and
> >> only looked here.
> >>
> >> Mailing the diff for my lack of better wording, plus the knob atually
> >> takes three values which I have yet to decode by reading wsconsctl(8)
> >> code.
> > The reason I had to look is because the (default) functionality does not
> > work reliably at all:
> > 
> > $ doas wsconsctl mouse.tp.tapping=1
> > mouse.tp.tapping -> 1,3,2
> > 
> > Single taps are always detected reliably and deliver left mouse button
> > clicks, but tripple and double taps for middle and right mouse button
> > clicks work are recognised so poorly that I first though multitouch
> > support wasn't there at all.
> 
> Can you tell whether that's a hardware or a driver problem?
I'd assume it's a driver a problem since I get the exact same behaviour
on both a Pinebook Pro and a Thinkpad X230.

> wsmouse logging might be helpful here. You could enable it by
> $ doas wsconsctl mouse.param=256:1,257:1
> , make a few two-finger taps, and deactivate it with
> $ doas wsconsctl mouse.param=256:0,257:0
> For the output:
> $ grep 'wsmouse0-' /var/log/messages
Thanks!  Here goes the Pinebook Pro:

One-finger tap:
[wsmouse0-in][4275] abs:636,444 mt:0x01:0
[wsmouse0-in][4556] mt:0x00:-1

Two-finger tap:
[wsmouse0-in][0319] abs:786,516 mt:0x01:0
[wsmouse0-in][0329] mt:0x03:0
[wsmouse0-in][0772] abs:652,270 mt:0x02:1

Three-finger tap:
[wsmouse0-in][8821] abs:942,561 mt:0x01:0
[wsmouse0-in][8831] mt:0x03:0
[wsmouse0-in][8842] mt:0x07:0
[wsmouse0-in][8852] abs:942,563
[wsmouse0-in][9434] mt:0x05:0
[wsmouse0-in][9455] abs:539,210 mt:0x04:2

Only the one-finger tap does a left click, the others do nothing.

Double two-finger tap:
[wsmouse0-in][1894] abs:740,312 mt:0x01:0
[wsmouse0-in][1894] mt:0x03:0
[wsmouse0-in][2035] abs:554,44 mt:0x02:1
[wsmouse0-in][2045] mt:0x00:-1
[wsmouse0-ev][2045] 5:2 18:0
[wsmouse0-in][2055] abs:744,344 mt:0x01:0
[wsmouse0-ev][2055] 4:2 18:0
[wsmouse0-in][2065] mt:0x03:0
[wsmouse0-in][2497] abs:555,67 mt:0x02:1

This delivers a right-click in almost all attempts (this is the log of a
successful one).

Touble three-finger tap:

[wsmouse0-in][7276] abs:1114,734 mt:0x01:0
[wsmouse0-in][7286] mt:0x03:0
[wsmouse0-in][7296] mt:0x07:0
[wsmouse0-in][7427] abs:769,543 mt:0x06:1
[wsmouse0-in][7437] abs:468,284 mt:0x04:2
[wsmouse0-in][7437] mt:0x00:-1
[wsmouse0-ev][7437] 5:1 18:0
[wsmouse0-in][7447] abs:476,238 mt:0x01:0
[wsmouse0-ev][7447] 4:1 18:0
[wsmouse0-in][7457] abs:476,239
[wsmouse0-in][7467] mt:0x03:0
[wsmouse0-in][7477] mt:0x07:0
[wsmouse0-in][7648] abs:1121,718 mt:0x06:1
[wsmouse0-in][7658] abs:761,521 mt:0x04:2

This practically never delivers a middle click except when I'm lucky
(this is the log of a successful one).

[wsmouse0-in][0238] abs:1113,661 mt:0x01:0
[wsmouse0-in][0248] mt:0x03:0
[wsmouse0-in][0258] mt:0x07:0
[wsmouse0-in][0399] mt:0x05:0
[wsmouse0-in][0399] mt:0x01:0
[wsmouse0-in][0429] mt:0x03:0
[wsmouse0-in][0439] mt:0x07:0
[wsmouse0-in][0549] mt:0x05:0
[wsmouse0-in][0580] abs:453,213 mt:0x04:2

For completeness, here are a few logs, all show failed double
three(3)-finger tap, i.e. none of them emitted a middle click;  tested
by selecting text and trying to paste it into firefox's URL bar with the
"scroll wheel click":

[wsmouse0-in][0238] abs:1113,661 mt:0x01:0
[wsmouse0-in][0248] mt:0x03:0
[wsmouse0-in][0258] mt:0x07:0
[wsmouse0-in][0399] mt:0x05:0
[wsmouse0-in][0399] mt:0x01:0
[wsmouse0-in][0429] mt:0x03:0
[wsmouse0-in][0439] mt:0x07:0
[wsmouse0-in][0549] mt:0x05:0
[wsmouse0-in][0580] abs:453,213 mt:0x04:2
[wsmouse0-in][0590] mt:0x00:-1

[wsmouse0-in][1102] abs:979,692 mt:0x01:0
[wsmouse0-in][1112] mt:0x03:0
[wsmouse0-in][1122] mt:0x07:0
[wsmouse0-in][1283] mt:0x05:0
[wsmouse0-in][1333] mt:0x07:0
[wsmouse0-in][1504] mt:0x05:0
[wsmouse0-in][1514] mt:0x01:0

[wsmouse0-in][8565] abs:419,279 mt:0x01:0
[wsmouse0-in][8616] mt:0x00:-1
[wsmouse0-ev][8616] 5:0 18:0
[wsmouse0-ev][8797] 4:0 18:0
[wsmouse0-in][8837] abs:1073,709 mt:0x01:0
[wsmouse0-in][8847] mt:0x03:0
[wsmouse0-in][8857] mt:0x07:0
[wsmouse0-in][9058] mt:0x05:0
[wsmouse0-in][9098] abs:1074,709
[wsmouse0-in][9098] mt:0x07:0
[wsmouse0-in][9118] abs:1075,710
[wsmouse0-in][9138] abs:1076,710
  

Re: wsconsctl.conf: mention mouse.tp.tapping in example

2021-03-22 Thread Ulf Brosziewski
On 3/22/21 10:19 PM, Klemens Nanni wrote:
> On Mon, Mar 22, 2021 at 08:18:45PM +0100, Klemens Nanni wrote:
>> I was too stupid to look at `wsconsctl' output (which needs root) and
>> only looked here.
>>
>> Mailing the diff for my lack of better wording, plus the knob atually
>> takes three values which I have yet to decode by reading wsconsctl(8)
>> code.
> The reason I had to look is because the (default) functionality does not
> work reliably at all:
> 
>   $ doas wsconsctl mouse.tp.tapping=1
>   mouse.tp.tapping -> 1,3,2
> 
> Single taps are always detected reliably and deliver left mouse button
> clicks, but tripple and double taps for middle and right mouse button
> clicks work are recognised so poorly that I first though multitouch
> support wasn't there at all.

Can you tell whether that's a hardware or a driver problem?

wsmouse logging might be helpful here. You could enable it by
$ doas wsconsctl mouse.param=256:1,257:1
, make a few two-finger taps, and deactivate it with
$ doas wsconsctl mouse.param=256:0,257:0
For the output:
$ grep 'wsmouse0-' /var/log/messages

> 
> That's not the case though: two-finger srolling just works smoothly and
> pondering the touchpad with repeated double or tripple taps does
> deliver respective clicks eventually - so it's really just the tap
> support needing some love.
> 
>> Anyone with a better text for the example so grepping "mouse" or "tap"
>> shows me what I'm looking for?
> Here's a better one.
> 
> Feedback? OK?
> 
> 
> Index: etc/examples/wsconsctl.conf
> ===
> RCS file: /cvs/src/etc/examples/wsconsctl.conf,v
> retrieving revision 1.1
> diff -u -p -r1.1 wsconsctl.conf
> --- etc/examples/wsconsctl.conf   16 Jul 2014 13:21:33 -  1.1
> +++ etc/examples/wsconsctl.conf   22 Mar 2021 21:18:35 -
> @@ -9,3 +9,5 @@
>  #display.vblank=on   # enable vertical sync blank for screen burner
>  #display.screen_off=6# set screen burner timeout to 60 seconds
>  #display.msact=off   # disable screen unburn w/ mouse
> +#mouse.tp.tapping=0  # 1,3,2=interpret one/three/two (simultaneous)
> + # tap(s) as left/middle/right mouse button click
> 



Re: wsconsctl.conf: mention mouse.tp.tapping in example

2021-03-22 Thread Bryan Steele
On Mon, Mar 22, 2021 at 08:18:45PM +0100, Klemens Nanni wrote:
> I was too stupid to look at `wsconsctl' output (which needs root) and
> only looked here.
> 
> Mailing the diff for my lack of better wording, plus the knob atually
> takes three values which I have yet to decode by reading wsconsctl(8)
> code.

Appears to be documented here:

https://man.openbsd.org/wsmouse.4#mouse.tp.tapping

> Anyone with a better text for the example so grepping "mouse" or "tap"
> shows me what I'm looking for?
> 
> 
> Index: examples/wsconsctl.conf
> ===
> RCS file: /cvs/src/etc/examples/wsconsctl.conf,v
> retrieving revision 1.1
> diff -u -p -r1.1 wsconsctl.conf
> --- examples/wsconsctl.conf   16 Jul 2014 13:21:33 -  1.1
> +++ examples/wsconsctl.conf   22 Mar 2021 19:15:52 -
> @@ -9,3 +9,4 @@
>  #display.vblank=on   # enable vertical sync blank for screen burner
>  #display.screen_off=6# set screen burner timeout to 60 seconds
>  #display.msact=off   # disable screen unburn w/ mouse
> +#mouse.tp.tapping=0  # 1=click on touch not physical push
> 
> 



Re: wsconsctl.conf: mention mouse.tp.tapping in example

2021-03-22 Thread Klemens Nanni
On Mon, Mar 22, 2021 at 08:18:45PM +0100, Klemens Nanni wrote:
> I was too stupid to look at `wsconsctl' output (which needs root) and
> only looked here.
> 
> Mailing the diff for my lack of better wording, plus the knob atually
> takes three values which I have yet to decode by reading wsconsctl(8)
> code.
The reason I had to look is because the (default) functionality does not
work reliably at all:

$ doas wsconsctl mouse.tp.tapping=1
mouse.tp.tapping -> 1,3,2

Single taps are always detected reliably and deliver left mouse button
clicks, but tripple and double taps for middle and right mouse button
clicks work are recognised so poorly that I first though multitouch
support wasn't there at all.

That's not the case though: two-finger srolling just works smoothly and
pondering the touchpad with repeated double or tripple taps does
deliver respective clicks eventually - so it's really just the tap
support needing some love.

> Anyone with a better text for the example so grepping "mouse" or "tap"
> shows me what I'm looking for?
Here's a better one.

Feedback? OK?


Index: etc/examples/wsconsctl.conf
===
RCS file: /cvs/src/etc/examples/wsconsctl.conf,v
retrieving revision 1.1
diff -u -p -r1.1 wsconsctl.conf
--- etc/examples/wsconsctl.conf 16 Jul 2014 13:21:33 -  1.1
+++ etc/examples/wsconsctl.conf 22 Mar 2021 21:18:35 -
@@ -9,3 +9,5 @@
 #display.vblank=on # enable vertical sync blank for screen burner
 #display.screen_off=6  # set screen burner timeout to 60 seconds
 #display.msact=off # disable screen unburn w/ mouse
+#mouse.tp.tapping=0# 1,3,2=interpret one/three/two (simultaneous)
+   # tap(s) as left/middle/right mouse button click