Quantcast

remapping pointer buttons

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

remapping pointer buttons

Ethan Grammatikidis
i use a mouse with a button on the side which i remapped to button 2 under linux. i've been using it this way for years, i'm very used to it. i just started using this mouse with freebsd, and i can't figure out how to remap the buttons. here's what i found, in reverse chronological order:

xinput silently fails for every pointer device except the core pointer, where it reports an x error. i assume you're not meant to use it with the core pointer, and i don't even want to; i want this to be specific to this one mouse.

xmodmap reports an x error.

lshal reports a dbus error: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

documentation for moused and lower-level mouse seemed disinclined to mention button mapping. i would like the same button mapping to apply in the framebuffer as well as x.

i have severe fatigue issues and i've just had to move a rather fiddly setup involving a laptop with external drive and screen onto my desk with the ecosystem of cabling behind it. i've done it now when i'm already fatigued because my primary workstation died unexpectedly yesterday morning. i'd appreciate an easy answer.

--
Linux? I used ext4 for a few years. In proportion to the time spent using it, I lost as much data to it as I lost to the very worst released version of reiserfs.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: remapping pointer buttons

Polytropon
On Fri, 19 May 2017 16:37:28 +0100, Ethan Grammatikidis wrote:

> i use a mouse with a button on the side which i remapped to button 2
> under linux. i've been using it this way for years, i'm very used to
> it. i just started using this mouse with freebsd, and i can't figure
> out how to remap the buttons. here's what i found, in reverse
> chronological order:
>
> xinput silently fails for every pointer device except the core pointer,
> where it reports an x error. i assume you're not meant to use it with
> the core pointer, and i don't even want to; i want this to be specific
> to this one mouse.

You should be able to use xorg.conf partial additions (no need
for a complete xorg.conf file). Check "man xorg.conf" for details.



> xmodmap reports an x error.

This program is inteded for keyboard mapping, not for the mouse,
and it only works in X.



> lshal reports a dbus error: Failed to connect to socket /var/run/dbus
> /system_bus_socket: No such file or directory

HAL has been deprecated on Linux long time ago and isn't really
useful on FreeBSD.



> documentation for moused and lower-level mouse seemed disinclined
> to mention button mapping. i would like the same button mapping to
> apply in the framebuffer as well as x.

See "man moused", especially the -m option. At least for the OS,
this is basic functionality which can be configured easily. On X
it is more complicated of course. ;-)




--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: remapping pointer buttons

Ethan Grammatikidis
On Fri, May 19, 2017, at 05:07 PM, Polytropon wrote:
>
> You should be able to use xorg.conf partial additions (no need
> for a complete xorg.conf file). Check "man xorg.conf" for details.

thanks

> > xmodmap reports an x error.
>
> This program is inteded for keyboard mapping, not for the mouse,
> and it only works in X.

actually, it was the only way to set button mapping when i started using x on secondhand 486s over 20+ years ago! of course, i didn't need it then. i suppose someone thought "mouse button mapping... we have a program for mapping inputty things, i'll add it to that!" i'm slightly grateful it wasn't part of xset. given xset's impenetrable manual page and inconsistent syntax, i'm sure it would have been impossible!

> > lshal reports a dbus error: Failed to connect to socket /var/run/dbus
> > /system_bus_socket: No such file or directory
>
> HAL has been deprecated on Linux long time ago and isn't really
> useful on FreeBSD.

oh good! looks like i'll get through my whole life without having to learn about hal. now if only i'd had the sense to skip some other things, like fvwm which has 6 billion commands to do almost but not quite what i want, or red hat 5.2's init scripts which nearly put me off shell script for life!

> > documentation for moused and lower-level mouse seemed disinclined
> > to mention button mapping. i would like the same button mapping to
> > apply in the framebuffer as well as x.
>
> See "man moused", especially the -m option. At least for the OS,
> this is basic functionality which can be configured easily. On X
> it is more complicated of course. ;-)

thanks! that looks really easy now you've pointed it out... or it will be when i find out where moused is started, which i'm sure i can manage on my own. i like moused's m=n syntax, much less cumbersome than xmodmap or xinput with their lists of numbers.

--
Linux? I used ext4 for a few years. In proportion to the time spent using it, I lost as much data to it as I lost to the very worst released version of reiserfs.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: remapping pointer buttons

Ethan Grammatikidis
On Fri, May 19, 2017, at 06:43 PM, Ethan Grammatikidis wrote:
> On Fri, May 19, 2017, at 05:07 PM, Polytropon wrote:
> >
> > See "man moused", especially the -m option. At least for the OS,
> > this is basic functionality which can be configured easily. On X
> > it is more complicated of course. ;-)
>
> thanks! that looks really easy now you've pointed it out... or it will be when i find out where moused is started, which i'm sure i can manage on my own. i like moused's m=n syntax, much less cumbersome than xmodmap or xinput with their lists of numbers.

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.

i could i try using xorg.conf to just make the same mapping in x, but i'd like to just have one authoritative setting. um... brain's gone blank. i need to set a bigger font for the framebuffer anyway; doing that first.

--
Linux? I used ext4 for a few years. In proportion to the time spent using it, I lost as much data to it as I lost to the very worst released version of reiserfs.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: remapping pointer buttons

Ethan Grammatikidis
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. 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.

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.

--
Linux? I used ext4 for a few years. In proportion to the time spent using it, I lost as much data to it as I lost to the very worst released version of reiserfs.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: remapping pointer buttons

Polytropon
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, ...
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Loading...