[PATCH libinput 0/6] Middle mouse button emulation

Peter Hutterer peter.hutterer at who-t.net
Wed Apr 15 18:12:40 PDT 2015


On Wed, Apr 15, 2015 at 06:05:09PM -0700, Bill Spitzak wrote:
> 
> On 04/15/2015 02:46 PM, Peter Hutterer wrote:
> >On Wed, Apr 15, 2015 at 07:32:01AM -0700, Bill Spitzak wrote:
> >>Is this being done for physical mice with two buttons? The comments seem to
> >>indicate not, which seems kind of pointless: if a client has to emulate it
> >>for a physical mouse it will be emulating it for touchpads as well.
> >
> >not quite, there are two parts to it: configuration and the actual
> >emulation. You may get both or just the emulation, if you have both you can
> >turn emulation on/off otherwise it's always on. in the current patchset:
> >
> >* if a device has left+right but not middle, emulation is enabled by
> >   default but no configuration option is present (i.e. cannot be turned off)
> >* if a touchpad has a middle button, no emulation or config option
> >* if a non-touchpad device has a middle button, emulation is disabled by
> >   default but can be enabled through the config option
> 
> I would check on Windows or Mac I think it is pretty common that emulation
> works whether or not there is a real middle button, maybe with the ability
> to turn it off.
> 
> >>Delaying a press to see if it is a middle click is also probably annoying.
> >>It should send the down event for the first button, then the down event for
> >>middle when the second button is pressed (ie the client will see it as a
> >>left+middle or right+middle click).
> >
> >yeah, no. you now have the onus on the client to guess whether it needs to
> >filter the left click or not.
> 
> If there is a fixed latency between a button being pressed and the result
> (because it is waiting to see if it is a middle button emulation) then it is
> going to look slow to the user. This is especially annoying because single
> button clicks are probably more common than middle button emulation.

which is why we only enable it by default where it is definitely needed.

Cheers,
   Peter

> Alternatively the latency will be so short that it will be difficult to get
> an actual middle mouse button emulation.


More information about the wayland-devel mailing list