Re: windows noob needs pointers to writing a device driver
- From: "Doron Holan [MS]" <doronh@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 18 Apr 2005 00:47:06 -0700
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
.
- Follow-Ups:
- Re: windows noob needs pointers to writing a device driver
- From: Ray Trent
- Re: windows noob needs pointers to writing a device driver
- References:
- windows noob needs pointers to writing a device driver
- From: Shea Martin
- Re: windows noob needs pointers to writing a device driver
- From: Tim Roberts
- Re: windows noob needs pointers to writing a device driver
- From: shea martin
- Re: windows noob needs pointers to writing a device driver
- From: Doron Holan [MS]
- Re: windows noob needs pointers to writing a device driver
- From: shea martin
- windows noob needs pointers to writing a device driver
- Prev by Date: Re: URB_FUNCTION_RESET_PIPE
- Next by Date: Re: driver reload from kernel mode
- Previous by thread: Re: windows noob needs pointers to writing a device driver
- Next by thread: Re: windows noob needs pointers to writing a device driver
- Index(es):
Relevant Pages
|
Loading