<div>Hi Frediano,</div><div><br></div><div>Yes it's quite a bit incoherent, having said that, i just saw a picture of a mouse with like 30 buttons on it :-)</div><div>Didn't have time yet to test your patches Kevin, will do so in evening hours, I will update you after.</div><div><br></div><div>From the bottom of my thumb, i thank you :-)</div><div><br></div><div>Roger<br></div><br><br><blockquote type="cite" style="margin:0 0 0 0.5em;border-left:1px #00f solid;padding-left:1em;">De : Frediano Ziglio <fziglio@redhat.com><br>
À : Kevin Pouget <kpouget@redhat.com><br>
Sujet : Re: [Spice-devel] spice-vdagent: how to enable additional mouse buttons?<br>
Date : 14/05/2020 17:12:01 Europe/Paris<br>
Copie à : bruts@netc.fr;<br>
Spice devel <spice-devel@lists.freedesktop.org><br>
<br>
> Hello,<br>
<br>
> I've pushed some commits to get the mouse buttons working with the VDAgent<br>
> (and only it, some bits are missing in spice-server to handle the other<br>
> types I think):<br>
<br>
> <a href="https://gitlab.freedesktop.org/kpouget/spice/-/commits/exp/mouse-bt" rel="noreferrer">https://gitlab.freedesktop.org/kpouget/spice/-/commits/exp/mouse-bt</a><br>
> <a href="https://gitlab.freedesktop.org/kpouget/spice-gtk/-/commits/exp/mouse-bt" rel="noreferrer">https://gitlab.freedesktop.org/kpouget/spice-gtk/-/commits/exp/mouse-bt</a><br>
> <a href="https://gitlab.freedesktop.org/kpouget/spice-protocol/-/commits/exp/mouse-bt" rel="noreferrer">https://gitlab.freedesktop.org/kpouget/spice-protocol/-/commits/exp/mouse-bt</a><br>
> <a href="https://gitlab.freedesktop.org/kpouget/vd_agent/-/tree/exp/mouse-bt" rel="noreferrer">https://gitlab.freedesktop.org/kpouget/vd_agent/-/tree/exp/mouse-bt</a><br>
<br>
Nine and simple! Thanks!<br>
<br>
Wondering why there's no SPICE_MOUSE_BUTTON_MASK_UP and SPICE_MOUSE_BUTTON_MASK_DOWN.<br>
It looks a bit incoherent.<br>
Not a regression of your patches. Maybe they don't change some internal status<br>
<br>
> and I uploaded a small demo of the way it works in my workstation: my mouse<br>
> has 2 extra buttons (8 and 9) that are properly forwarded<br>
> > <a href="http://people.redhat.com/~kpouget/20-05-14/mouse-bt.mkv" rel="noreferrer">http://people.redhat.com/~kpouget/20-05-14/mouse-bt.mkv</a><br>
<br>
> I hope it will work the same on your side!<br>
<br>
> On Wed, May 13, 2020 at 11:20 AM < bruts@netc.fr > wrote:<br>
<br>
> > Hi Kevin and Frediano,<br>
> <br>
<br>
> > Yes there might be issues like Frediano is pointing out, probably they are<br>
> > not well defined, so it might be not trivial to create something for the<br>
> > public out of this.<br>
> <br>
> > Still I wonder why there are these entries in<br>
> > /usr/include/linux/input-event-codes.h:<br>
> <br>
> > #define BTN_MOUSE 0x110<br>
> <br>
> > #define BTN_LEFT 0x110<br>
> <br>
> > #define BTN_RIGHT 0x111<br>
> <br>
> > #define BTN_MIDDLE 0x112<br>
> <br>
> > #define BTN_SIDE 0x113<br>
> <br>
> > #define BTN_EXTRA 0x114<br>
> <br>
> > #define BTN_FORWARD 0x115<br>
> <br>
> > #define BTN_BACK 0x116<br>
> <br>
> > #define BTN_TASK 0x117<br>
> <br>
<br>
> > They must have some meaning no? Perhaps they are matched to different mouse<br>
> > buttons, like one time to button 8, the other mouse declares it as button<br>
> > 10, that is what you mean?<br>
> <br>
<br>
> > Still I would be very happy if Kevin would have the time to make a little<br>
> > patch, or an approach to that little patch, so I could use it for my<br>
> > individual mouse buttons, I understand it is not easy to get this out to<br>
> > the<br>
> > public, still if there is a patch available in the mailing list, then at<br>
> > least people can grab that and change it to their liking, right?<br>
> <br>
<br>
> > Anyway, all the replies and help is appreciated! Let's get my thumb happy<br>
> > and<br>
> > give him that mouse button ;)<br>
> <br>
<br>
> > > De : Frediano Ziglio < fziglio@redhat.com ><br>
> > <br>
> <br>
> > > À : Kevin Pouget < kpouget@redhat.com ><br>
> > <br>
> <br>
> > > Sujet : Re: [Spice-devel] spice-vdagent: how to enable additional mouse<br>
> > > buttons?<br>
> > <br>
> <br>
> > > Date : 13/05/2020 09:49:45 Europe/Paris<br>
> > <br>
> <br>
> > > Copie à : bruts@netc.fr ;<br>
> > <br>
> <br>
> > > Spice devel < spice-devel@lists.freedesktop.org ><br>
> > <br>
> <br>
<br>
> > > Hi,<br>
> > <br>
> <br>
> > > if I remember I think the main issue is that these buttons are kind of<br>
> > > wild<br>
> > > west.<br>
> > <br>
> <br>
> > > Basically what is button 6 (first 5 are well defined) ? It can be<br>
> > > anything<br>
> > > so<br>
> > > it could<br>
> > <br>
> <br>
> > > be that for instance my client left becomes right on the guest.<br>
> > <br>
> <br>
> > > Maybe just changing mouse model the semantic of the buttons on the guest<br>
> > > change.<br>
> > <br>
> <br>
> > > Also I remember that GTK had some problems, these buttons are not<br>
> > > defined,<br>
> > > I<br>
> > > think<br>
> > <br>
> <br>
> > > they are passed from the underlying system (Windows, X11, Wayland).<br>
> > <br>
> <br>
<br>
> > > However I see two "workaround":<br>
> > <br>
> <br>
> > > 1- let the users take care of the mismatch. Either getting used to use a<br>
> > > button<br>
> > <br>
> <br>
> > > instead of the other or using some tools;<br>
> > <br>
> <br>
> > > 2- add a message to communicate the meaning of the various buttons (which<br>
> > > can<br>
> > <br>
> <br>
> > > change for instance changing mouse).<br>
> > <br>
> <br>
<br>
> > > I think 1 is what was implemented by the patches, I'd go for this way.<br>
> > <br>
> <br>
> > > I hope softwares are not associating button semantics to computer<br>
> > > shutdown<br>
> > <br>
> <br>
> > > or something "dangerous" like this.<br>
> > <br>
> <br>
<br>
> > > Frediano<br>
> > <br>
> <br>
<br>
> > > > On Tue, May 12, 2020 at 11:58 PM < bruts@netc.fr > wrote:<br>
> > > <br>
> > <br>
> <br>
<br>
> > > > > Hi Victor,<br>
> > > > <br>
> > > <br>
> > <br>
> <br>
<br>
> > > > > Yes it was certainly a good read and i got some ideas from it, but<br>
> > > > > the<br>
> > > > > code<br>
> > > > > has changed quite a lot since 2017 and the patches correspond to the<br>
> > > > > current<br>
> > > > > code only for about 10-15%.<br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > Maybe someone from the Spice team can suggest a patch to add<br>
> > > > > additional<br>
> > > > > mouse<br>
> > > > > buttons - i am sure that it would be a matter of minutes to an hour<br>
> > > > > for<br>
> > > > > anyone who is involved with coding the spice-vdagent project to<br>
> > > > > create<br>
> > > > > a<br>
> > > > > general patch idea to add additional mouse buttons<br>
> > > > <br>
> > > <br>
> > <br>
> <br>
<br>
> > > > Hello,<br>
> > > <br>
> > <br>
> <br>
<br>
> > > > I'll give it a try this morning, indeed it shouldn't require (much|any)<br>
> > > > new<br>
> > > > code, only flags here and there. Let's see<br>
> > > <br>
> > <br>
> <br>
<br>
> > > > Kevin<br>
> > > <br>
> > <br>
> <br>
<br>
> > > > > It is just a matter of forwarding them to the guest - for some reason<br>
> > > > > it<br>
> > > > > was<br>
> > > > > decided not to add them.<br>
> > > > <br>
> > > <br>
> > <br>
> <br>
<br>
> > > > > thanks!<br>
> > > > <br>
> > > <br>
> > <br>
> <br>
<br>
> > > > > > De : Victor Toso < victortoso@redhat.com ><br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > À : bruts@netc.fr<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > Sujet : Re: [Spice-devel] spice-vdagent: how to enable additional<br>
> > > > > > mouse<br>
> > > > > > buttons?<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > Date : 12/05/2020 07:25:59 Europe/Paris<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > Copie à : uril@redhat.com ;<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > spice-devel@lists.freedesktop.org<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
<br>
> > > > > > Hi,<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
<br>
> > > > > > On Tue, May 12, 2020 at 12:53:02AM +0200, bruts@netc.fr wrote:<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > ><br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > ><br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > > Uri (and others),<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > ><br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > > I found the similar question in a few corners of the internet<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > > and I think adding at least the additional default mouse<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > > buttons should not be all that much work.<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
<br>
> > > > > > You can take a look at this proposal to adding horizontal wheel<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > support to Spice<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
<br>
> > > > > > <a href="https://lists.freedesktop.org/archives/spice-devel/2017-October/040558.html" rel="noreferrer">https://lists.freedesktop.org/archives/spice-devel/2017-October/040558.html</a><br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
<br>
> > > > > > > With some guidance I could probably do it myself, though the<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > > guidance would need to be quite substantial :)<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > ><br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > > The mouse and the main buttons is already forwarded and that is<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > > the main part.<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > ><br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > > with xev it is clear to see which buttons work on the host, but<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > > not on the guest.<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > ><br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > > Anyone with some spare time (which I know is always limited for<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > > everyone), but help me where to fix this in the code and i will<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > > write a patch - or give me a good start - or start yourself.<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > ><br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > > a semi working mouse in the guest is very annoying and can be<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > > one of the critical points why to use spice (or not) - at least<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > > i know it is in my case.<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > ><br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > > Thanks!!<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
<br>
> > > > > > Cheers,<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > > Victor<br>
> > > > > <br>
> > > > <br>
> > > <br>
> > <br>
> <br>
<br>
> > > > > _______________________________________________<br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > Spice-devel mailing list<br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > Spice-devel@lists.freedesktop.org<br>
> > > > <br>
> > > <br>
> > <br>
> <br>
> > > > > <a href="https://lists.freedesktop.org/mailman/listinfo/spice-devel" rel="noreferrer">https://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
> > > > <br>
> > > <br>
> > <br>
> <br>
<br>
> > > > _______________________________________________<br>
> > > <br>
> > <br>
> <br>
> > > > Spice-devel mailing list<br>
> > > <br>
> > <br>
> <br>
> > > > Spice-devel@lists.freedesktop.org<br>
> > > <br>
> > <br>
> <br>
> > > > <a href="https://lists.freedesktop.org/mailman/listinfo/spice-devel" rel="noreferrer">https://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
> > > <br>
> > <br>
> <br>
<br></blockquote>