You are incorrect on a few points.
I8042prt.sys is loaded for ps2 devices (both keyboard and mouse)
Kbdhid.sys is loaded for HID devices (USB, Bluetooth, etc)
So on LF systems, kbdhid is still loaded (as is mouhid for mice).
Win32k listens for and and sends reads to the keyboard device interface
guid, not the HID interface for keyboards (and the mouse device
interface guid for mice). Starting in XP, win32k understands raw HID
for devices outside of keyboard and mouse as well (WM_INPUT), but it
still reads from the keyboards and mice using KEYBOARD_INPUT_DATA and
MOUSE_INPUT_DATA.
What you want to do is install your own device stack for your keyboard
in the keyboard device class. This will auto load kbdclass on top of
you. Then, just call the service class callback when you have any data.
Since you are reporting KEYBOARD_INPUT_DATAs which contain scancodes and
not HID, there is no conversion. Kbdclass takes care of the read IRPs
on your behalf, you just worry about getting the data to kbdclass.
D
This posting is provided “AS IS” with no warranties, and confers no
rights
-----Original Message-----
From: xxxxx@stg.com [mailto:xxxxx@stg.com]
Sent: Thursday, April 17, 2003 1:37 PM
To: NT Developers Interest List
Subject: [ntdev] RE: HID report question
If I may ask, if you are getting your scancodes from ps2 keyboard, why
do you need to convert that into HID?
d
Basically my situation is that I’m writing a driver that needs to run on
systems which may or may not have an i8042 port on them for the
keyboard.
The driver gets keyboard data from across the network, and needs to
insert
that KB data into the input stream.
From what I’ve read (in various WinHEC/WinDEV presentations), on systems
without i8042 user32.exe/win32k.sys will grab data *directly* from HID
devices (since there would be no need to load up kbdhid.sys and
kbdclass.sys to handle an i8042 keyboard). This directly contradicts the
drawing in the DDK, which shows that user32.exe/win32k.sys *only* goes
through the kbdclass.sys driver, but it makes sense and seems like the
DDK
drawing is wrong…
So going on the assumption that win32k.sys can read directly from a HID
driver for input data, I want to get the scancodes from across the
network, and format them into a HID report that can be used to satisfy
win32k.sys HID IRP_MJ_READ requests…
Is my assumption about kbdclass.sys not always being loaded incorrect? I
don’t see why kbdclass.sys and kbdhid.sys would be loaded on a
legacy-free
system since they would just add unnecessary complexity as opposed to
reading the HID data directly… and if a i8042 HID minidriver was ever
written, then kbdclass.sys and kbdhid.sys would be irrelevant…
Thanks for your help,
sean
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com