<div>Hi Kevin and Frediano,</div><div><br></div><div>Yes there might be issues like Frediano is pointing out, probably they are not well defined, so it might be not trivial to create something for the public out of this.</div><div>Still I wonder why there are these entries in /usr/include/linux/input-event-codes.h:<br>#define BTN_MOUSE 0x110<br>#define BTN_LEFT 0x110<br>#define BTN_RIGHT 0x111<br>#define BTN_MIDDLE 0x112<br>#define BTN_SIDE 0x113<br>#define BTN_EXTRA 0x114<br>#define BTN_FORWARD 0x115<br>#define BTN_BACK 0x116<br>#define BTN_TASK 0x117<br></div><div><br></div><div>They must have some meaning no? Perhaps they are matched to different mouse buttons, like one time to button 8, the other mouse declares it as button 10, that is what you mean?</div><div><br></div><div>Still I would be very happy if Kevin would have the time to make a little patch, or an approach to that little patch, so I could use it for my individual mouse buttons, I understand it is not easy to get this out to the public, still if there is a patch available in the mailing list, then at least people can grab that and change it to their liking, right?</div><div><br></div><div>Anyway, all the replies and help is appreciated! Let's get my thumb happy and give him that mouse button ;)<br></div><div><br></div><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 : 13/05/2020 09:49:45 Europe/Paris<br>
Copie à : bruts@netc.fr;<br>
Spice devel <spice-devel@lists.freedesktop.org><br>
<br>
<div style="font-family:courier new,courier,monaco,monospace,sans-serif;font-size:12pt;color:#000000;"><div>Hi,<br></div><div> if I remember I think the main issue is that these buttons are kind of wild west.<br></div><div>Basically what is button 6 (first 5 are well defined) ? It can be anything so it could<br></div><div>be that for instance my client left becomes right on the guest.<br></div><div>Maybe just changing mouse model the semantic of the buttons on the guest change.<br></div><div>Also I remember that GTK had some problems, these buttons are not defined, I think<br></div><div>they are passed from the underlying system (Windows, X11, Wayland).<br></div><div><br></div><div>However I see two "workaround":<br></div><div>1- let the users take care of the mismatch. Either getting used to use a button<br></div><div> instead of the other or using some tools;<br></div><div>2- add a message to communicate the meaning of the various buttons (which can<br></div><div> change for instance changing mouse).<br></div><div><br></div><div>I think 1 is what was implemented by the patches, I'd go for this way.<br></div><div>I hope softwares are not associating button semantics to computer shutdown<br></div><div>or something "dangerous" like this.<br></div><div><br></div><div>Frediano<br></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div><br></div><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 12, 2020 at 11:58 PM <<a>bruts@netc.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div>Hi Victor,</div><div><br></div><div>Yes it was certainly a good read and i got some ideas from it, but the code has changed quite a lot since 2017 and the patches correspond to the current code only for about 10-15%.</div><div>Maybe someone from the Spice team can suggest a patch to add additional mouse buttons - i am sure that it would be a matter of minutes to an hour for anyone who is involved with coding the spice-vdagent project to create a general patch idea to add additional mouse buttons</div></blockquote><div><br></div><div>Hello,</div><div><br></div><div>I'll give it a try this morning, indeed it shouldn't require (much|any) new code, only flags here and there. Let's see</div><div><br></div><div>Kevin<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div><br></div><div>It is just a matter of forwarding them to the guest - for some reason it was decided not to add them.</div><div><br></div><div>thanks!<br></div><div><br></div><br><div><br></div><blockquote style="margin:0px 0px 0px 0.5em;border-left:1px solid rgb(0,0,255);padding-left:1em;">De : Victor Toso <<a>victortoso@redhat.com</a>><br> À : <a>bruts@netc.fr</a><br> Sujet : Re: [Spice-devel] spice-vdagent: how to enable additional mouse buttons?<br> Date : 12/05/2020 07:25:59 Europe/Paris<br> Copie à : <a>uril@redhat.com</a>;<br> <a>spice-devel@lists.freedesktop.org</a><br> <br> Hi,<br> <br> On Tue, May 12, 2020 at 12:53:02AM +0200, <a>bruts@netc.fr</a> wrote:<br> > <br> > <br> > Uri (and others),<br> > <br> > I found the similar question in a few corners of the internet<br> > and I think adding at least the additional default mouse<br> > buttons should not be all that much work.<br> <br> You can take a look at this proposal to adding horizontal wheel<br> support to Spice<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> > With some guidance I could probably do it myself, though the<br> > guidance would need to be quite substantial :)<br> > <br> > The mouse and the main buttons is already forwarded and that is<br> > the main part.<br> > <br> > with xev it is clear to see which buttons work on the host, but<br> > not on the guest.<br> > <br> > Anyone with some spare time (which I know is always limited for<br> > everyone), but help me where to fix this in the code and i will<br> > write a patch - or give me a good start - or start yourself.<br> > <br> > a semi working mouse in the guest is very annoying and can be<br> > one of the critical points why to use spice (or not) - at least<br> > i know it is in my case.<br> > <br> > Thanks!!<br> <br> Cheers,<br> Victor<br> <br></blockquote>_______________________________________________<br> Spice-devel mailing list<br> <a>Spice-devel@lists.freedesktop.org</a><br> <a href="https://lists.freedesktop.org/mailman/listinfo/spice-devel" rel="noreferrer">https://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br></blockquote></div></div><br>_______________________________________________<br>Spice-devel mailing list<br>Spice-devel@lists.freedesktop.org<br><a href="https://lists.freedesktop.org/mailman/listinfo/spice-devel" rel="noreferrer">https://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br></blockquote><div><br></div></div></blockquote>