remapping pointer buttons
freebsd at edvax.de
Sat May 20 07:26:32 UTC 2017
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:
Option "Device" "/dev/sysmouse"
Option "Protocol" "Auto"
Option "ZAxisMapping" "4 5"
Option "EmulateWheelButton" "2"
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,
> 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.
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions