[PATCH libinput 0/6] Middle mouse button emulation

Peter Hutterer peter.hutterer at who-t.net
Wed Apr 15 14:46:13 PDT 2015


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

> 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.

Cheers,
   Peter


> 
> On 04/14/2015 08:51 PM, Peter Hutterer wrote:
> >
> >we already had middle mouse button emulation for softbuttons, but not on
> >physical buttons. This patchset adds support for physical buttons.
> >
> >Couple of general notes:
> >* some devices, e.g. 2-button touchpads, have middle button emulation
> >   enabled, but not exposed as config option
> >* if you have a middle button emulation is always off by default.
> >* pressing anything but left/right will stop emulation for this sequence, so
> >   you can't do an emulated middle button + back button or something. I'm not
> >   aware of any workflow that actually requires this.
> >
> >Cheers,
> >   Peter
> 
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
> 


More information about the wayland-devel mailing list