Re: windows noob needs pointers to writing a device driver



no, no need to hack kbdhid. usb keyboards run under the HID protocol, which
adds another layer of complexity. kbdhid uses the hid parser (hidparse.sys)
to get a normalized HID report packet and convert it into scan codes. now
the problem is that you need to also do this.

If you filter in between kbdhid and the PDO (as a device lower filter), you
can snoop the reads and get the data you want. BUT, you have no way to
report that data b/c kbdhid receives and completes the
IOCTL_KEYBOARD_CONNECT request which contains the service callback function
pointer.

If you filter above kbdhid, you also have problems. now you can't snoop
reads. nor can you open the device to send your own reads b/c the RITopens
the device for exclusive read.

You want to stick to a simpler stack. HID and input are somewhat
complicated and not illustrative of how to write a general purpose driver.
If you really want to learn on a piece of USB hardware, OSR has a cool
little devboard you can buy which has a seven segment display and an LED
ladder. check it out.... http://www.osronline.com/article.cfm?article=382

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"shea martin" <smartin@xxxxxxxxx> wrote in message
news:CpG8e.1053203$Xk.130824@xxxxxxxxxxx
> Doron Holan [MS] wrote:
>> the extra key's scan codes in a sun keyboard are not handled by the
>> keyboard stack, they are handled by windows input subsystem itself (the
>> raw input thread (RIT)).
> So would it be possible to write a keyboard driver?
>
> if it is a ps2 device, the scan codes bubble up to the RIT.
>> if it is a usb device, they are probably lost at the HID mapper layer
>> (kbdhid.sys) b/c the parser does not know about the usage -> scan code
>> mapping for those keys (but it could, this is off the top of my head).
>> Technically you could attempt to add value here, but that would be very
>> difficult given how kbdhid reports packets.
>>
> As I said it is a USB keyboard.
>
> I am not really sure what you are suggesting. Are you saying that writing
> a keyboard driver would be useless? Or that I should hack kbhid.sys to
> make it recognize the scan code?
>
> ~S


.



Relevant Pages

  • Re: windows noob needs pointers to writing a device driver
    ... no need to hack kbdhid. ... kbdhid uses the hid parser ... So would it be possible to write a keyboard driver? ...
    (microsoft.public.development.device.drivers)
  • [PATCH] Input quirk for the Fn key on Powerbooks with an USB keyboard
    ... keyboard has been replaced with an USB one conforming to the HID spec. ... The 'Fn' modifier key on this keyboard is a soft key reported using an ...
    (Linux-Kernel)
  • Re: Injecting keyboard scan codes at driver level
    ... as a hid miniport you cannot create a control device object. ... use the WDK 6001 osrfx2hid sample which is really a full blown KMDF driver using a HID miniport that is purely pass through. ... You will need to create a control object to communictate (you cant open the keyboard directly) ... scan codes to the keyboard data stream based on data received from the user ...
    (microsoft.public.development.device.drivers)
  • Re: HID minidriver with multiple report descriptors
    ... does the keyboard device have a hw ID ... Please do not send e-mail directly to this alias. ... HID descriptor. ... my hid minidriver contain 3 top level collections of report: ...
    (microsoft.public.development.device.drivers)
  • Re: [git pull] Input update for 2.6.17
    ... USB HID v1.10 Keyboard [Mitsumi Electric Apple Extended USB ... Bluetooth dongle on the USB bus. ...
    (Linux-Kernel)

Loading