简体   繁体   中英

How to set keyboard indicator light from windows kernel mode driver?

I want to write a kernel mode program that toggles the numlock light on the keyboard when a key is pressed.

I started by modifying the kbfiltr.c provided with the WinDDK samples, using the KbFilter_ServiceCallback routine to intercept a key and I'm trying to send an (IOCTL_KEYBOARD_SET_INDICATORS) by IRP to set the light.

I'm quite new to driver development and I can't find how to code this properly.

Can anyone help out by giving direction to any code examples?

I figured it out with information and source code provided by Microsoft at:

http://support.microsoft.com/kb/326315

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM