[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hardware
Subject:    Re: USB mouse buttons
From:       Doug White <dwhite () gumbysoft ! com>
Date:       2004-07-28 2:15:14
Message-ID: 20040727190430.C45805 () carver ! gumbysoft ! com
[Download RAW message or body]

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
_______________________________________________
freebsd-hardware@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hardware
To unsubscribe, send any mail to "freebsd-hardware-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic