[Xorg] [PATCH] allow EmulateWheel to generate normal clicks too

Andrew Pimlott andrew at pimlott.net
Sun Aug 15 13:06:15 PDT 2004


On Sun, Aug 15, 2004 at 02:55:45PM -0400, Alex Deucher wrote:
> On Sun, 15 Aug 2004 04:55:00 -0400, Andrew Pimlott <andrew at pimlott.net> wrote:
> > I just got hooked on the EmulateWheel feature, for which I use
> > EmulateWheelButton 2.  But I also like having a third button, and I
> > believe it's possible to have the best of both:  If I press button 2 and
> > release it without moving the mouse, it's a button 2 press; otherwise,
> > it's an emulated wheel.
> 
> there's a similar patch in bugzilla:
> http://freedesktop.org/bugzilla/show_bug.cgi?id=323

Cool, dueling patches!  They have the same goal, but there is a
difference in approaches.  Mathias uses a timeout to decide when a click
was intended.  I use the lack of motion.  His has the advantage that it
can be used reliably with normal mice, where it is hard to keep from
moving while clicking.  It has the disadvantage that if one does a very
brief emulated scroll (I sometimes just want to move a line or two), one
might also get an unwanted click.  Mathias, I wonder if you have ever
had this problem in practice?

One way to get both advantages might be to have a threshold of pixels
moved while the button was down, below which we create a click.  This
could be combined with a timeout: click if the button is released in
time, and the mouse hasn't moved very far.  Personally, I find timeouts
somewhat unintuitive, so I would rather just judge by motion.  But maybe
this doesn't work for everyone.

Perhaps users of EmulateWheel might think about the options for this
feature between now and when it can be merged.  I am willing to refine
the code based on any consensus rearched.

Andrew



More information about the xorg mailing list