Re: Xinput button mapping and middle button emulation

2016-10-27 Thread Peter Hutterer
On Mon, Oct 24, 2016 at 05:02:47PM +0200, Tobia Conforto wrote: > Hi Peter > (and list) > > After some digging, I found that the mapping from mouse scan code to > button number is hardcoded in the kernel driver[1], so I patched the > evdev Xorg driver to add an Emulate3Button option. It configures

Re: Xinput button mapping and middle button emulation

2016-10-24 Thread Tobia Conforto
Hi Peter (and list) After some digging, I found that the mapping from mouse scan code to button number is hardcoded in the kernel driver[1], so I patched the evdev Xorg driver to add an Emulate3Button option. It configures the button number to emit when pressing left and right together. I followed

Re: Xinput button mapping and middle button emulation

2016-10-17 Thread Peter Hutterer
On Mon, Oct 17, 2016 at 07:57:14PM +0200, Tobia Conforto wrote: > > I think what you could do is map MB emulation to button 10 (that is > > driver-internal) and then init the button mapping so that button 10 is > > logical button 2 and button 2 is logical button 8. > > Yes, but how do I map the MB

Re: Xinput button mapping and middle button emulation

2016-10-17 Thread Tobia Conforto
> I think what you could do is map MB emulation to button 10 (that is > driver-internal) and then init the button mapping so that button 10 is > logical button 2 and button 2 is logical button 8. Yes, but how do I map the MB emulation to button 10, short of patching the driver? It doesn't look lik

Re: Xinput button mapping and middle button emulation

2016-10-16 Thread Peter Hutterer
On Thu, Oct 13, 2016 at 01:31:06PM +0200, Tobia Conforto wrote: > Yes, I probably misused a couple of terms. > > As you say, the middle button emulation happens in the evdev Xorg > driver, in fact it's controlled by the "Emulate3Buttons" option. The > kernel simply generates the MSC_SCAN and BTN_*

Re: Xinput button mapping and middle button emulation

2016-10-13 Thread Tobia Conforto
Yes, I probably misused a couple of terms. As you say, the middle button emulation happens in the evdev Xorg driver, in fact it's controlled by the "Emulate3Buttons" option. The kernel simply generates the MSC_SCAN and BTN_* codes that I pasted. So, as far as I can tell, there are two ways to get

Re: Xinput button mapping and middle button emulation

2016-10-13 Thread Peter Hutterer
On Mon, Oct 10, 2016 at 12:35:42PM +0200, Tobia Conforto wrote: > I have a mouse with 4 physical buttons (Kensington Slimblade > Trackball), let's call them A B C D, plus 3 axes: mouse X, Y, and > scroll wheel. I'm using Xorg 1:7.7+13ubuntu3 on Linux Mint 18, kernel > 4.4.0-38-generic. > > Buttons