<div>Hi,</div><div><br></div><div>Yes most likely. <br></div><div>I find these lines of code:</div><div><br></div><div>/* buttons */<br> ioctl(uinput->fd, UI_SET_EVBIT, EV_KEY);<br> ioctl(uinput->fd, UI_SET_KEYBIT, BTN_LEFT);<br> ioctl(uinput->fd, UI_SET_KEYBIT, BTN_MIDDLE);<br> ioctl(uinput->fd, UI_SET_KEYBIT, BTN_RIGHT);<br><br> /* wheel */<br> ioctl(uinput->fd, UI_SET_EVBIT, EV_REL);<br> ioctl(uinput->fd, UI_SET_RELBIT, REL_WHEEL);<br><br></div><div>I will probably need to declare the additional mouse buttons of my mouse (Logitech G403), so I run xev to find some information:</div><div><br></div><div>(BTN_LEFT, BTN_RIGHT, button 8, button 9)<br></div><div><br></div><div>ButtonPress event, serial 48, synthetic NO, window 0x3000001,<br> root 0x3ad, subw 0x0, time 361327, (127,94), root:(128,144),<br> state 0x0, button 1, same_screen YES<br><br>ButtonRelease event, serial 48, synthetic NO, window 0x3000001,<br> root 0x3ad, subw 0x0, time 361426, (127,94), root:(128,144),<br> state 0x100, button 1, same_screen YES<br><br>ButtonPress event, serial 48, synthetic NO, window 0x3000001,<br> root 0x3ad, subw 0x0, time 362448, (127,94), root:(128,144),<br> state 0x0, button 3, same_screen YES<br><br>ButtonRelease event, serial 48, synthetic NO, window 0x3000001,<br> root 0x3ad, subw 0x0, time 362556, (127,94), root:(128,144),<br> state 0x400, button 3, same_screen YES<br><br>ButtonPress event, serial 48, synthetic NO, window 0x3000001,<br> root 0x3ad, subw 0x0, time 366829, (127,94), root:(128,144),<br> state 0x0, button 8, same_screen YES<br><br>ButtonRelease event, serial 48, synthetic NO, window 0x3000001,<br> root 0x3ad, subw 0x0, time 366949, (127,94), root:(128,144),<br> state 0x0, button 8, same_screen YES<br><br>ButtonPress event, serial 48, synthetic NO, window 0x3000001,<br> root 0x3ad, subw 0x0, time 368093, (127,94), root:(128,144),<br> state 0x0, button 9, same_screen YES<br><br>ButtonRelease event, serial 48, synthetic NO, window 0x3000001,<br> root 0x3ad, subw 0x0, time 368250, (127,94), root:(128,144),<br> state 0x0, button 9, same_screen YES</div><div><br></div><div>Now the next question is obvious: how do I adjust the code to add support for button 8,9 ?</div><div><br></div><div>I thought BTN_LEFT and BTN_RIGHT would be declared in uinput.h but they are global variables? or where are they declared?</div><div><br></div><div>Any help with adding support for these buttons would be very appreciated and finally make me stop using virtualbox lol.</div><div><br></div><div>Thanks!<br></div><div><br></div><div><br></div><div><br></div><blockquote type="cite" style="margin:0 0 0 0.5em;border-left:1px #00f solid;padding-left:1em;">De : Uri Lublin <uril@redhat.com><br>
À : bruts@netc.fr;<br>
spice-devel@lists.freedesktop.org<br>
Sujet : Re: [Spice-devel] spice-vdagent: how to enable additional mouse buttons?<br>
Date : 03/05/2020 17:33:55 Europe/Paris<br>
<br>
On 5/1/20 3:51 PM, bruts@netc.fr wrote:<br>
> <br>
> I am using spice-vdagent on most of my qemu-kvm vm's, while this is very <br>
> convenient, mouse button 8 and 9 are not working (those are the side <br>
> buttons of the mouse, one is often used for BACK function of the <br>
> browser, which my thumb is actually addicted to).<br>
> How could i make these buttons work with spice-vdagent?<br>
<br>
Hi,<br>
<br>
Currently 5 mouse buttons are supported. I think some code is needed to <br>
be added in order to support more buttons.<br>
<br>
Uri.<br>
<br>
> <br>
> Thanks for the suggestions,<br>
> <br>
> Bruts<br>
<br></blockquote>