[NTDEV] How to implement an USB mutil keys mouse?

Dear all,

I am trying to write a driver for my mutil keys mouse. The mouse is a
HID-compliant mouse and have these extension functions:
1.tilt wheel,I want to use it in winXp/win2k;
2.two costomer define keys. For example,customer can define these 2 keys
as ZoomIn/ZoomOut(or other function) keys themself.

But now I dont know how to start this driver. I have a MSFT IE4 mouse and
its tilt wheel driver seems be “HidServ.dll”.
And my question is :
1.Should I write a kernel model driver or a dll?
2.what is the HidServ.dll for?
3.Are there some documents for how to start an HID-compliant
mouse/keyboard driver?

regards,
Linxb

  1. there is no OS support for the title wheel in XP and win2k IIRC. this means you have to emluate it in a user mode helper program.
  2. if these keys are in the mouse top level collection, you will need to write a lower filter to capture these buttons and, again, reflect them up to user mode. if the mouse is properly designed, these buttons are exposed as a separate top level collection and you can directly access these buttons in user mode without a driver

hidserv.dll is an NT service which which maps HID usages to the appropriate WM_APPCOMMAND windows message. see http://msdn2.microsoft.com/en-us/library/ms646275.aspx for what WM_APPCOMMAND is. hidserv is installed on consumer collections.

in the end, you don’t want to write a full fledged keyboard or mouse driver, the system supplied drivers, kbdhid and mouhid.sys. instead, you will want to write a lower filter below these drivers if the data you need is a part of the keyboard or mouse top level collection.

d