### USB Mouse

Hi Folks,

Is there a way to send a command to a USB mouse?

I am planning on designing something that would look just like a HID USB
Mouse, but I would like to support some calibration commands and lights/etc
on this “mouse”.

Is there some windows API/etc that can I use to send a command to my custom
mouse so that I could have the processor in the mouse flash lights/etc?

Thanks

Steve Spano
FLE

Expose a 2nd top level HID collection which has the necessary reports
for your custom data. The actual mouse itself is not openable since the
OS opens it for exclusive access.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Steve Spano
Sent: Friday, December 01, 2006 3:31 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] ### USB Mouse

Hi Folks,

Is there a way to send a command to a USB mouse?

I am planning on designing something that would look just like a HID USB
Mouse, but I would like to support some calibration commands and
lights/etc
on this “mouse”.

Is there some windows API/etc that can I use to send a command to my
custom
mouse so that I could have the processor in the mouse flash lights/etc?

Thanks

Steve Spano
FLE


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Yes, but there’s one bit of trickiness: Windows opens pointing devices
and keyboards exclusively, so your app that wanted to send commands to
it wouldn’t be able to open the device. One way around that would be to
have your device report 2 HID Top Level Collections, one of which is the
mouse, and the other of which has vendor-specific output reports defined.

Another way around it would be a HID filter driver, but that’s not for
the faint of heart.

Steve Spano wrote:

Hi Folks,

Is there a way to send a command to a USB mouse?

I am planning on designing something that would look just like a HID USB
Mouse, but I would like to support some calibration commands and lights/etc
on this “mouse”.

Is there some windows API/etc that can I use to send a command to my custom
mouse so that I could have the processor in the mouse flash lights/etc?

Thanks

Steve Spano
FLE


Ray
(If you want to reply to me off list, please remove “spamblock.” from my
email address)

Hi,

Thanks for the fast reply!

So you mean I should have my processor respond as both a USB HID Mouse + a
secondary device? I could then directly open a channel to the secondary
device and issue commands?

Steve Spano
FLE

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ray Trent
Sent: Friday, December 01, 2006 6:40 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] ### USB Mouse

Yes, but there’s one bit of trickiness: Windows opens pointing devices
and keyboards exclusively, so your app that wanted to send commands to
it wouldn’t be able to open the device. One way around that would be to
have your device report 2 HID Top Level Collections, one of which is the
mouse, and the other of which has vendor-specific output reports defined.

Another way around it would be a HID filter driver, but that’s not for
the faint of heart.

Steve Spano wrote:

Hi Folks,

Is there a way to send a command to a USB mouse?

I am planning on designing something that would look just like a HID USB
Mouse, but I would like to support some calibration commands and
lights/etc
on this “mouse”.

Is there some windows API/etc that can I use to send a command to my
custom
mouse so that I could have the processor in the mouse flash lights/etc?

Thanks

Steve Spano
FLE


Ray
(If you want to reply to me off list, please remove “spamblock.” from my
email address)


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

No, HID has its own abstraction of top level collections (TLCs) of data.
You will enumerate as one device. The HID class driver will enumerate 2
children, one for the mouse, one for your vendor data. If you are
unfamiliar with HID TLCs, you should read the HID spec before proceeding
any further…

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Steve Spano
Sent: Friday, December 01, 2006 4:01 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] ### USB Mouse

Hi,

Thanks for the fast reply!

So you mean I should have my processor respond as both a USB HID Mouse +
a
secondary device? I could then directly open a channel to the secondary
device and issue commands?

Steve Spano
FLE

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ray Trent
Sent: Friday, December 01, 2006 6:40 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] ### USB Mouse

Yes, but there’s one bit of trickiness: Windows opens pointing devices
and keyboards exclusively, so your app that wanted to send commands to
it wouldn’t be able to open the device. One way around that would be to
have your device report 2 HID Top Level Collections, one of which is the

mouse, and the other of which has vendor-specific output reports
defined.

Another way around it would be a HID filter driver, but that’s not for
the faint of heart.

Steve Spano wrote:

Hi Folks,

Is there a way to send a command to a USB mouse?

I am planning on designing something that would look just like a HID
USB
Mouse, but I would like to support some calibration commands and
lights/etc
on this “mouse”.

Is there some windows API/etc that can I use to send a command to my
custom
mouse so that I could have the processor in the mouse flash
lights/etc?

Thanks

Steve Spano
FLE


Ray
(If you want to reply to me off list, please remove “spamblock.” from my

email address)


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Thanks! Will review.

Steve Spano
FLE

-----Original Message-----
From: Doron Holan
To: “Windows System Software Devs Interest List”
Date: Fri, 1 Dec 2006 16:05:44 -0800
Subject: RE: [ntdev] ### USB Mouse

No, HID has its own abstraction of top level collections (TLCs) of data.
You will enumerate as one device. The HID class driver will enumerate 2
children, one for the mouse, one for your vendor data. If you are
unfamiliar with HID TLCs, you should read the HID spec before proceeding
any further…

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Steve Spano
Sent: Friday, December 01, 2006 4:01 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] ### USB Mouse

Hi,

Thanks for the fast reply!

So you mean I should have my processor respond as both a USB HID Mouse +
a
secondary device? I could then directly open a channel to the secondary
device and issue commands?

Steve Spano
FLE

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ray Trent
Sent: Friday, December 01, 2006 6:40 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] ### USB Mouse

Yes, but there’s one bit of trickiness: Windows opens pointing devices
and keyboards exclusively, so your app that wanted to send commands to
it wouldn’t be able to open the device. One way around that would be to
have your device report 2 HID Top Level Collections, one of which is the

mouse, and the other of which has vendor-specific output reports
defined.

Another way around it would be a HID filter driver, but that’s not for
the faint of heart.

Steve Spano wrote:
> Hi Folks,
>
> Is there a way to send a command to a USB mouse?
>
> I am planning on designing something that would look just like a HID
USB
> Mouse, but I would like to support some calibration commands and
lights/etc
> on this “mouse”.
>
> Is there some windows API/etc that can I use to send a command to my
custom
> mouse so that I could have the processor in the mouse flash
lights/etc?
>
> Thanks
>
> Steve Spano
> FLE
>
>
>
>


Ray
(If you want to reply to me off list, please remove “spamblock.” from my

email address)


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Add the second HID collection to your mouse’s firmware, then send the HID
reports to it from user mode using HID API.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Steve Spano”
To: “Windows System Software Devs Interest List”
Sent: Saturday, December 02, 2006 2:30 AM
Subject: [ntdev] ### USB Mouse

> Hi Folks,
>
> Is there a way to send a command to a USB mouse?
>
> I am planning on designing something that would look just like a HID USB
> Mouse, but I would like to support some calibration commands and lights/etc
> on this “mouse”.
>
> Is there some windows API/etc that can I use to send a command to my custom
> mouse so that I could have the processor in the mouse flash lights/etc?
>
> Thanks
>
> Steve Spano
> FLE
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

> So you mean I should have my processor respond as both a USB HID Mouse + a

secondary device? I could then directly open a channel to the secondary
device and issue commands?

Yes.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com