Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 May 2017 09:26:20 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Ethan Grammatikidis <eekee57@fastmail.fm>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: remapping pointer buttons
Message-ID:  <20170520092620.8d373fb7.freebsd@edvax.de>
In-Reply-To: <1495219659.1490726.982391760.50A04D90@webmail.messagingengine.com>
References:  <1495208248.1449918.982161320.0B87F123@webmail.messagingengine.com> <20170519180758.f3d8d15c.freebsd@edvax.de> <1495215787.1476791.982307560.646FF759@webmail.messagingengine.com> <1495219094.1488826.982382488.519D524D@webmail.messagingengine.com> <1495219659.1490726.982391760.50A04D90@webmail.messagingengine.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 19 May 2017 19:47:39 +0100, Ethan Grammatikidis wrote:
> On Fri, May 19, 2017, at 07:38 PM, Ethan Grammatikidis wrote:
> > 
> > almost! aaaalmost! i added a line to /etc/rc.conf, unplugged and
> > reconnected my usb mouse, and saw my "-m 8=2" in the output of ps.
> > i thought it was great, until i found it doesn't actually work.
> > in x, button 8 is still button 8.
> 
> sorry, replied too fast. in x, with '-m 8=2', button 8 is still button
> 8 but button 2 becomes button 12, leaving me with no button 2 at all.

As I said, X handles input differently than the text mode console.
For the console, moused configuration applies. But for X, you need
to mess with xinput, maybe through a partial xorg.conf file where
you only set options for the mouse.

Here is an example for such an entry:

Section "InputDevice"
	Identifier	"Mouse0"
	Driver		"mouse"
	Option		"Device"		"/dev/sysmouse"
	Option		"Protocol"		"Auto"
	Option		"ZAxisMapping"		"4 5"
	Option		"Emulate3Buttons"
	Option		"EmulateWheel"
	Option		"EmulateWheelButton"	"2"
EndSection

Of course you'd have to define only the relevant options that you
actually need for the button re-mapping; see "man xorg.conf" and
assorted X documentation. :-)



> i thought i'd misunderstood the man page, so i set '-m 2=8', but
> that again makes no change to button 8 in x while button 2 stops
> sending anything at all.

Just mind the _scope_ of the moused utility. Check "man moused",
there is also an option for debugging where you can examine the
events appearing for the mouse (similar to the X event viewer,
xev).



> i'll leave it for a while as i'm replying too fast. if someone
> could tell me how to test mouse buttons in the framebuffer console
> (like i can with xev in x), i'd be grateful.

With "moused -d -f <further options>" it is easily possible.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170520092620.8d373fb7.freebsd>