You Need to change the IoCreateDevice routine in DriverEntry
especially FILE_DEVICE_UNKNOWN part to say FILE_DEVICE_KEYBOARDTypes and associated
changes.
PDEVICE_OBJECT deviceObject;
RtlInitUnicodeString(&deviceName, L"DeviceMyHwDriver");
RtlInitUnicodeString(&symLinkName, L"DosDevicesMyHwDriver");
status = IoCreateDevice(
DriverObject,
sizeof(REGISTER_EVENT),
&deviceName,
0, //FILE_DEVICE_UNKNOWN,
0,
FALSE,
&deviceObject);
http://msdn.microsoft.com/en-us/library/windows/hardware/ff563821%28v=vs.85%29.aspx
Check DDK/WDK Sample for more details. It will definitely contains samples which you can adapt..
Tom