Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Aug 2006 19:15:47 +0200
From:      =?ISO-8859-1?Q?=22Jos=E9_M=2E_Fandi=F1o=22?= <freebsd4@fadesa.es>
To:        freebsd-usb@freebsd.org
Subject:   Re: ums(4) and Apple Mighty Mouse
Message-ID:  <44E4A443.3040301@fadesa.es>
In-Reply-To: <44E44F52.1060103@fadesa.es>
References:  <44E3544C.3030204@fadesa.es> <44E44F52.1060103@fadesa.es>

next in thread | previous in thread | raw e-mail | index | archive | help
 >Jos=E9 M. Fandi=F1o wrote:
>> Now is when the problem comes, the Z axis is mapped to
>> the horizontal scrolling, which is very confusing because
>> to scroll a web page you need move horizontally the
>> trackball.


I've found a possible solution but I don't know if
this might break something.


--- sys/dev/usb/ums.c.original  Thu Aug 17 19:06:33 2006
+++ sys/dev/usb/ums.c   Thu Aug 17 19:06:55 2006
@@ -267,9 +267,9 @@
         }

         /* try to guess the Z activator: first check Z, then WHEEL */
-       if (hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Z)=
,
+       if (hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WH=
EEL),
                        hid_input, &sc->sc_loc_z, &flags) ||
-           hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WH=
EEL),
+           hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Z)=
,
                        hid_input, &sc->sc_loc_z, &flags) ||
             hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_T=
WHEEL),
                        hid_input, &sc->sc_loc_z, &flags)) {


now the Z axis is located at 32/8 with the mighty mouse and
at 24/8 with a standard mouse.


Aug 17 19:07:54 info kernel: ums0: Mitsumi Electric Apple Optical USB Mou=
se, rev 1.10/1.08, addr 2, iclass 3/1
Aug 17 19:07:54 info kernel: ums_attach: bLength=3D7 bDescriptorType=3D5 =
bEndpointAddress=3D1-in bmAttributes=3D3 wMaxPacketSize=3D6 bInterval=3D1=
0
Aug 17 19:07:54 info kernel: ums0: 4 buttons and Z dir.
Aug 17 19:07:54 info kernel: ums_attach: sc=3D0xc27ae000
Aug 17 19:07:54 info kernel: ums_attach: X    8/8
Aug 17 19:07:54 info kernel: ums_attach: Y    16/8
Aug 17 19:07:54 info kernel: ums_attach3: Z   32/8
Aug 17 19:07:54 info kernel: ums_attach: B1   0/1
Aug 17 19:07:54 info kernel: ums_attach: B2   1/1
Aug 17 19:07:54 info kernel: ums_attach: B3   2/1
Aug 17 19:07:54 info kernel: ums_attach: B4   3/1
Aug 17 19:07:54 info kernel: ums_attach: size=3D6, id=3D0

Aug 17 19:08:08 info kernel: ums0: Logitech USB-PS/2 Optical Mouse, rev 2=
=2E00/20.00, addr 2, iclass 3/1
Aug 17 19:08:08 info kernel: ums_attach: bLength=3D7 bDescriptorType=3D5 =
bEndpointAddress=3D1-in bmAttributes=3D3 wMaxPacketSize=3D4 bInterval=3D1=
0
Aug 17 19:08:08 info kernel: ums0: 3 buttons and Z dir.
Aug 17 19:08:08 info kernel: ums_attach: sc=3D0xc26a0000
Aug 17 19:08:08 info kernel: ums_attach: X    8/8
Aug 17 19:08:08 info kernel: ums_attach: Y    16/8
Aug 17 19:08:08 info kernel: ums_attach3: Z   24/8
Aug 17 19:08:08 info kernel: ums_attach: B1   0/1
Aug 17 19:08:08 info kernel: ums_attach: B2   1/1
Aug 17 19:08:08 info kernel: ums_attach: B3   2/1
Aug 17 19:08:08 info kernel: ums_attach: size=3D4, id=3D0







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44E4A443.3040301>