Windows Keyboard filter driver

Hey everyone,

So, I’m developing a device driver which should filter keys(Key scan codes), and my goal is to be able to send all filtered keys to User mode application with the help of IOCTL’s. By the way, I’m able to filter those scan code trough IRP_MJ_READ dispatch routine, and print them out with DbgPrint, but my goal is to send them to the user mode, which in turn will map them to ASCII/Unicode with MapViruralKeyEx, there’s a way to overcome this problem?.

How the driver is actually works:

  1. Create a device(FILE_KEYBORD_DEVICE).

  2. Attach this device to the target Device(KeyboardClass0).

  3. Set a completion(ReadCompletionRoutine) routine by IoSetCompletionRoutineEx.

  4. Filter IRP requests, trough irp->AssociatedIrp.systemBuffer. Which, get converted to KEYBOARD_INPUT_DATA structure. And extract the MakeCode field.

  5. Complete the request, and, forward the IRP to I/O manager.

There is a way to complete the request trough IOCTL, and not trough a Read?

Note:

Keyboard device is capable to use METHOD_BUFFRED.

Thx ;).

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.