How to make OS to Read a non existing Keyboard

Dear All,
I want to write a upper filter driver (for hid device) to get IRP_MJ_READ
IRP packet for a non existing Keyboard from OS kernel. And then I return
this IRP back (which filled with my keyboard code ) without passing the IRP
down to the lower stack.

How can i do this ??

Could I just simply create device object filled with device type
“FILE_DEVICE_KEYBOARD” ? Then the OS Kernel will send IRP_MJ_READ to my
filter ?

Thank You Very much !

Regards,
Yu Chi Wai

If the keyboard does not exist, how are you loading your filter? Are
you trying to convert a HID device which is not a keyboard into keyboard
keystroke?

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@sengital.com
Sent: Friday, October 22, 2004 11:30 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to make OS to Read a non existing Keyboard

Dear All,
I want to write a upper filter driver (for hid device) to get
IRP_MJ_READ
IRP packet for a non existing Keyboard from OS kernel. And then I return

this IRP back (which filled with my keyboard code ) without passing the
IRP
down to the lower stack.

How can i do this ??

Could I just simply create device object filled with device type
“FILE_DEVICE_KEYBOARD” ? Then the OS Kernel will send IRP_MJ_READ to my
filter ?

Thank You Very much !

Regards,
Yu Chi Wai


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

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Dear Doron Holan,

Right , I want to convert the HID device (Joystick) into keyboard keystroke.
But I don’t want to modify the IRP for the original Keyboard (the only
keyboard connecting to PC).

The filter will load when the HID device connected.

Thank you very much!

Regards,
Yu Chi Wai

“Doron Holan” ???:xxxxx@ntdev…
If the keyboard does not exist, how are you loading your filter? Are
you trying to convert a HID device which is not a keyboard into keyboard
keystroke?

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@sengital.com
Sent: Friday, October 22, 2004 11:30 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to make OS to Read a non existing Keyboard

Dear All,
I want to write a upper filter driver (for hid device) to get
IRP_MJ_READ
IRP packet for a non existing Keyboard from OS kernel. And then I return

this IRP back (which filled with my keyboard code ) without passing the
IRP
down to the lower stack.

How can i do this ??

Could I just simply create device object filled with device type
“FILE_DEVICE_KEYBOARD” ? Then the OS Kernel will send IRP_MJ_READ to my
filter ?

Thank You Very much !

Regards,
Yu Chi Wai


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

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

The device object’s type is not enough for the OS to see the keyboard.
It needs to also export the keyboard device interface. If you do that,
your joystick will not be openable anymore, so that doesn’t work. Do
you have a user mode application running? If so, add your filter to the
joystick and send messages to the user mode application. In response to
the messages from the driver, the user mode application will call
SendInput().

Your other alternative is to be a bus driver, enumerate a virtual
keyboard and feed the keystrokes through there. The user mode
application is much easier to implement and debug. I would recommend
the application solution.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@sengital.com
Sent: Friday, October 22, 2004 12:17 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to make OS to Read a non existing Keyboard

Dear Doron Holan,

Right , I want to convert the HID device (Joystick) into keyboard
keystroke.
But I don’t want to modify the IRP for the original Keyboard (the only
keyboard connecting to PC).

The filter will load when the HID device connected.

Thank you very much!

Regards,
Yu Chi Wai

“Doron Holan” ???:xxxxx@ntdev…
If the keyboard does not exist, how are you loading your filter? Are
you trying to convert a HID device which is not a keyboard into keyboard
keystroke?

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@sengital.com
Sent: Friday, October 22, 2004 11:30 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to make OS to Read a non existing Keyboard

Dear All,
I want to write a upper filter driver (for hid device) to get
IRP_MJ_READ
IRP packet for a non existing Keyboard from OS kernel. And then I return

this IRP back (which filled with my keyboard code ) without passing the
IRP
down to the lower stack.

How can i do this ??

Could I just simply create device object filled with device type
“FILE_DEVICE_KEYBOARD” ? Then the OS Kernel will send IRP_MJ_READ to my
filter ?

Thank You Very much !

Regards,
Yu Chi Wai


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

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


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

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com