Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mouse driver



I now have my IOUSBHIDDriver-based mouse driver and I'd like to be able to "trap" mouse clicks and override them in user space. I thought I could do this by overriding IOHIDDDevice::handleReport(), but there doesn't seem to be much I can do from there. I really thought that HID events would be the way to go for this (either creating my own, or piggy-backing onto others), but it's starting not to look that way. I guess another option is to roll my own user client, but that seems rather daunting to me - what are my options as far as kernel->userspace communication like this? Any help is much appreciated!

Jeff
----- Original Message ----- From: "Fernando Urbina" <email@hidden>
To: "Jeff Schindler" <email@hidden>
Cc: <email@hidden>
Sent: Tuesday, June 14, 2005 4:09 PM
Subject: Re: mouse driver



Why do you think that you need your own driver? In any case, the IOUSBHIDDriver is the driver for any mouse device. The AppleUSBOpticalMouse is just a vendor-specific driver that issues some commands to the driver. I would try to make your device work with the HID driver. Use the HID lib to communicate with your device from user space.

--
Fernando Urbina
USB Technology Team
Apple Computer, Inc.

On Jun 14, 2005, at 11:39 AM, Jeff Schindler wrote:

We are writing a device driver for a USB mouse. First off, from everything I've read (yes, I've read all the pertinent docs), it appears an in-kernel driver is the way to go. Looking at the Darwin source, it looks as though a good starting point would be AppleUSBOpticalMouse (ie subclassing IOUSBHIDDriver). I first considered the AppleUSBMouse class and subclassing IOHIPointing from the HID family, but then I noticed that AppleUSBMouse is obsolete and has been for some time (did AppleUSBOpticalMouse replace this?). Which is the best approach? Also, I assume I would need my own user client for user space communication (as opposed to using an existing user client) - is there a good starting point for that? Sorry for the newbi-ness of the questions - this is all new to me.





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden
References: 
 >mouse driver (From: "Jeff Schindler" <email@hidden>)
 >Re: mouse driver (From: Fernando Urbina <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.