unbrand When I try sudo wsconsctl -m -w scroll.reverse=1
that reverses the trackpad.
I just looked at the code, and it looks like that setting only works if you have a Synaptics touchpad. Setting it on anything else is useless, so I'll just strike out this first section:
Try setting that property only on the USB-mouse. First, find the USB-mouse. Use either:
$ fgrep wsmouse /var/run/dmesg.boot
wsmouse0 at pms0 mux 0
wsmouse1 at ums0 mux 0
$
(pms0
is the PS/2 touchpad and the USB-mouse is ums0
.)
or, use wsconsctl
:
$ sudo wsconsctl -f /dev/wsmouse0 -ma
type=ps2
scroll.reverse=0
scroll.distance.x=12
scroll.distance.y=12
repeat.buttons=none
repeat.delay.first=0
repeat.delay.decrement=0
repeat.delay.minimum=0
$
That's the touchpad.
$ sudo wsconsctl -f /dev/wsmouse1 -ma
type=usb
scroll.reverse=0
scroll.distance.x=12
scroll.distance.y=12
repeat.buttons=none
repeat.delay.first=0
repeat.delay.decrement=0
repeat.delay.minimum=0
$
This one looks like the USB-mouse. Change:
$ sudo wsconsctl -f /dev/wsmouse1 -m -w scroll.reverse=1
If doing this doesn't work--and it didn't for me (see update above)--then you can fix it in X. Create a ws.conf
file like this:
$ cat /etc/X11/xorg.conf.d/ws.conf
# Force creation of 2 separate input devices on NetBSD
#
Section "ServerLayout"
Identifier "X.org Configured"
InputDevice "Mouse0" "CorePointer"
InputDevice "Mouse1" "CorePointer"
EndSection
# Don't add the default `/dev/wsmouse` device. On NetBSD, this
# device is added _after_ our `Mouse0' and `Mouse1' devices,
# and so any customizations to those get overridden :(.
#
# (Note: hotplugging may not work with this setting.)
#
Section "ServerFlags"
Option "AutoAddDevices" "off"
EndSection
# This is the PS/2 touchpad; use standard mapping.
#
# (Use: fgrep wsmouse /var/run/dmesg.boot
# or wsconsctl(8) to find out which is which.)
#
Section "InputDevice"
Identifier "Mouse0"
Driver "ws"
Option "Device" "/dev/wsmouse0"
Option "ZAxisMapping" "4 5"
Option "WAxisMapping" "6 7"
EndSection
# This is the USB mouse; swap Z-axis buttons.
#
Section "InputDevice"
Identifier "Mouse1"
Driver "ws"
Option "Device" "/dev/wsmouse1"
Option "ZAxisMapping" "5 4"
Option "WAxisMapping" "6 7"
EndSection
$
If you want to change back to the standard mapping without restarting X, use xinput
:
$ xinput --list # find input devices
$ xinput --set-button-map Mouse1 1 2 3 4 5 6 7
To swap it again:
$ xinput --set-button-map Mouse1 1 2 3 5 4 6 7