diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -586,11 +586,11 @@ font8x8="NO" # font 8x8 from /usr/share/{syscons,vt}/fonts/* (or NO). blanktime="300" # blank time (in seconds) or "NO" to turn it off. saver="NO" # screen saver: Uses /boot/kernel/${saver}_saver.ko -moused_nondefault_enable="NO" # Treat non-default mice as enabled unless +moused_nondefault_enable="YES" # Treat non-default mice as enabled unless # specifically overridden in rc.conf(5). moused_enable="NO" # Run the mouse daemon. moused_type="auto" # See man page for rc.conf(5) for available settings. -moused_port="auto" # Set to your mouse port. +moused_port="/dev/psm0" # Set to your mouse port. moused_flags="" # Any additional flags to moused. mousechar_start="NO" # if 0xd0-0xd3 default range is occupied in your # language code table, specify alternative range diff --git a/libexec/rc/rc.d/moused b/libexec/rc/rc.d/moused --- a/libexec/rc/rc.d/moused +++ b/libexec/rc/rc.d/moused @@ -27,9 +27,10 @@ # expected to be the mouse device. # if [ -n "$2" ]; then - eval moused_$2_enable=\${moused_$2_enable-${moused_nondefault_enable}} - rcvar="moused_${2}_enable" - pidfile="${pidprefix}.$2.pid" + ms=`basename $2` + eval moused_${ms}_enable=\${moused_${ms}_enable-${moused_nondefault_enable}} + rcvar="moused_${ms}_enable" + pidfile="${pidprefix}.${ms}.pid" pidarg="-I $pidfile" fi @@ -44,10 +45,10 @@ # the moused_port variable, which if not defined sets it to the # passed in device name. # - ms=$1 + ms=`basename $1` if [ -n "$ms" ]; then eval myflags=\${moused_${ms}_flags-$moused_flags} - eval myport=\${moused_${ms}_port-/dev/$ms} + eval myport=\${moused_${ms}_port-/dev/$1} eval mytype=\${moused_${ms}_type-$moused_type} else ms="default" diff --git a/sbin/devd/moused.conf b/sbin/devd/moused.conf --- a/sbin/devd/moused.conf +++ b/sbin/devd/moused.conf @@ -33,3 +33,12 @@ action "service moused quietstop $cdev"; }; + +notify 100 { + match "system" "DEVFS"; + match "subsystem" "CDEV"; + match "type" "CREATE"; + match "cdev" "input/event[0-9]+"; + + action "service moused quietstart $cdev"; +}; diff --git a/usr.sbin/moused/moused/moused.conf b/usr.sbin/moused/moused/moused.conf --- a/usr.sbin/moused/moused/moused.conf +++ b/usr.sbin/moused/moused/moused.conf @@ -41,3 +41,22 @@ MousedVScrollMinDelta=1.25 # mm MousedVScrollHorArea=0.0 # mm MousedVScrollVerArea=-15.0 # mm + +# Don't receive events twice if hw.usb.usbhid.enable=0 is set +[Ignore ums devices] +MatchName=/dev/ums[0-9]* +MousedIgnoreDevice=1 +[Ignore atp devices] +MatchName=/dev/atp[0-9]* +MousedIgnoreDevice=1 +[Ignore wsp devices] +MatchName=/dev/wsp[0-9]* +MousedIgnoreDevice=1 + +# Uncomment these lines to get sysmouse-only behavior +#[Disable all devices] +#MatchName=* +#MousedIgnoreDevice=1 +#[Enable sysmouse devices] +#MatchName=/dev/* +#MousedIgnoreDevice=0