Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jul 2004 19:15:14 -0700 (PDT)
From:      Doug White <dwhite@gumbysoft.com>
To:        Alexander Motin <mav@alkar.net>
Cc:        freebsd-hardware@freebsd.org
Subject:   Re: USB mouse buttons
Message-ID:  <20040727190430.C45805@carver.gumbysoft.com>
In-Reply-To: <ce3plb$2ce9$1@pandora.alkar.net>
References:  <ce3plb$2ce9$1@pandora.alkar.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 26 Jul 2004, Alexander Motin wrote:

> I have Logitech MX510 mouse with 8 buttons. When I connect it to USB
> port I take message:
> Jul 26 18:07:58 orphanage kernel: ums0: Logitech USB-PS/2 Optical Mouse,
> rev 2.00/21.00, addr 2, iclass 3/1
> Jul 26 18:07:58 orphanage kernel: ums0: 7 buttons and Z dir.
>
> As I understand ums driver do not support mouses with more then 7
> buttons because of:
> #define MAX_BUTTONS     7       /* chosen because sc_buttons is u_char */
>
> But sc_buttons is int as I can see inside /usr/src/sys/i386/isa/mse.c

Thats the old Microsoft bus mouse driver, not the syscons mouse handling
stuff. sc_buttons is probably a dated reference, or a reference to NetBSD
(we share a lot of USB code with them).

src/dev/syscons/sysmouse.c appears to only have enough room in the
sysmouse protocol to support 10 buttons, which would imply that it can get
sent more than 7 :-)  Further investigation of the interface in
sys/mouse.h finds a bitfield big enough for 28 buttons. You'll have to use
the mapping feature to cram that down to the 10 you want, if you have a
device with more than 10 buttons.

Try upping that to 20-something and rebuilding things and see what you
get. If you get a panic, something's still amiss.

-- 
Doug White                    |  FreeBSD: The Power to Serve
dwhite@gumbysoft.com          |  www.FreeBSD.org



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