[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mouseemu

Hi Michael,

On Sat, 25 Mar 2006 16:55:21 +0100 (CET), "Michael Schmitz" <schmitz@zirkon.biophys.uni-duesseldorf.de> said:

> > I am now getting button 2 and button 3 events sent, but the
> > modifiers are getting sent too.
> That's per design, and was done to fix bug #304328. Maybe the fix
> broke your case, though.

After some consideration, I believe that that this new behaviour,
where the modifier is sent as well as the emulated mouse button, is
the cleanest and most "X-like" way of doing it.

> Remove the patch to pass though modifier events, then. Or at least
> block the modifer events that were used to generate the mouse events
> (see below).
> You lose the option to generate mouse events with modifers (but
> then, you cannot distinguish between a mouse event with and without
> modifier anyway, if you chose to use a modifier with the mouse
> keycode).

I looked at the mouseemu source code, and spent some time reading
various X documentation.  Based on my limited understanding of X, it
seems there is no clean way of mulitplexing modifier keys to fulfil
both tasks (mouse button emulation, but normal modifier behviour for
other keypresses).  I imagine that these issues are already

Later on today I will have at look at the behaviour of Apple X11, and
check out what events it is generating.

> First of all, don't use modifier keys tha you need to see in other
> apps with mouse emulation.
> Second, you can change the passthrough code to only pass a modifier
> event if it does not belong to a emulation key - this will get quite
> messy though. You'll need to delay the modifier for a short time to
> see if a mouse key follows (or send a modifier up, mouse button,
> modifier down sequence).

I think that out of all the workarounds, the suggestion to send a
modifier up, mouse button down sequence would be the best.  But still,
like you suggest, it will get quite messy.  I can imagine a few cases
in which this will lead to confusing and unintended behaviours.

Thank you, Michael, you for all your help and advice.

http://www.fastmail.fm - Email service worth paying for. Try it for free

Reply to: