Several methods of kernel programming keyboard filtering

Source: Internet
Author: User

First: Bind KBDCALSS Drive Object

The Kbdclass class-driven object is the topmost driver of the keyboard, and its distribution functions are handled without the underlying compatibility issues.

Idea: First use the Obreferenceobjectbyname function to open the Kbdclass drive object, and then use the DeviceObject pointer and the Nextdevice pointer to traverse all the device objects under the Kbdclass drive object. Each traversal one creates a device object attached to it, so that we write a distribution function of the drive object that can handle the IRP of the Kbdclass class-driven object.

The second type: direct substitution of kbdclass distribution functions

Third: Replace the Kbdclass callback function in the I8042PRT or Kbdhid driver object, and first search for the Kbdhid class-driven object in the i8042prt or Kbdclass-driven object. Then search for the function address in the Kbdclass class-driven object, and finally replace the callback function,

Fourth: Modifying the processing of 0x93 interrupts in the IDT table

Fifth: For the Ioapic interrupt controller, the IRQ1 corresponding interrupt number is replaced with the interrupt number outside the 0x93 (custom interrupt number and processing function)

Several methods of kernel programming keyboard filtering

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.