forwarded 304328 [EMAIL PROTECTED]
Thanks

Hi Guido and Colin

I'm forwarding your report to the upstream author Colin Leroy. 

On Tue, Apr 12, 2005 at 01:07:39PM +0200, Guido Guenther wrote:
> as of 0.14 modifier keys used with mousemu stopped sending keycodes
> completely, which makes the keys unusable. I'm using:
> 
> MID_CLICK="-middle 125 272"       # Opt key (right of space) + Click
> RIGHT_CLICK="-right 96 272"       # Enter (right of opt key) + Click
> 
> Because of that both Opt keys and Enter aren't usable as "regular"
> modifiers after mouseemu started, they don't send keycodes anymore. This
> worked find with 0.12. xev show with 0.12:

The upstream README notes:
 0.15 Integrate patch by Danny Tholen to suppress keypresses when it's the
 button key.

This is part of this change. I think that the change is reasonable for
keys which are not modifiers. It's not usefull to have a keypress and a
mouse button press at the same time with the same action.

For modifier keys the case is a little bit more difficult. I tried to
use the ctrl-key as a modifier and that did not work until the change,
because ctrl+rightclick is another X event than just rightclick, but if
you use the ctrl key as the modifier you don't want ctrl+rightclick but
just rightclick when pressing ctrl and the mouse button. So the right
solution is probably a bit tricky.

The attached patch restores the old behaviour (sending keycodes) for
modifier keys. IMO this is only a part way solution. I did not test this
yet, but I think the best would be to send modifier keyevents and if the
mouse button is pressed to send a release keyevent before sending the
rightclick event and sending a keypress event afterwards. 

What do you think about this?

Gaudenz

-- 
Ever tried. Ever failed. No matter.
Try again. Fail again. Fail better.
~ Samuel Beckett ~
--- mouseemu-0.15.orig/mouseemu.c
+++ mouseemu-0.15/mouseemu.c
@@ -174,7 +174,7 @@
        /* I think its best not to pass scroll, or experiment with not passing 
the release if
         * we actually used it for scrolling (but some apps may get stuck?)
         */
-               if (inp.code != b2_key && inp.code != b3_key && !b2_mod_pressed 
&& !b3_mod_pressed) {
+               if (inp.code != b2_key && inp.code != b3_key) {
                        passthrough(ui_keyb_fd, inp);
                }
        }

Attachment: pgpyqwDddXMTU.pgp
Description: PGP signature

Reply via email to