Select the product you need help with
How to disable the keyboard Sleep button with a filter driverArticle ID: 302092 - View products that this article applies to. This article was previously published under Q302092 SUMMARY
The Sleep hot key that exists on newer keyboards allows you to suspend the computer to a lower power state. For certain systems the lower power state may not be beneficial. This article explains how to disable the Sleep hot key feature by using a filter driver in the target device stack.
MORE INFORMATION
To disable the Sleep hot key, you must filter the IOCTL_GET_SYS_BUTTON_CAPS device I/O control request IRP sent by the Power Manager to the devices that register one of the following device interface classes:
GUID_CLASS_INPUT or GUID_DEVINTERFACE_HID
The IOCTL_GET_SYS_BUTTON_CAPS request is sent by the Power Manager to obtain the system button capabilities from Human Input Device (HID) devices. The drivers for the HID devices return the capabilities as a bitmask in the Irp->AssociatedIrp.SystemBuffer field. The bits values are defined as:
GUID_DEVICE_SYS_BUTTON #define SYS_BUTTON_POWER 0x00000001 // Power toggle key #define SYS_BUTTON_SLEEP 0x00000002 // Sleep key #define SYS_BUTTON_LID 0x00000004 #define SYS_BUTTON_WAKE 0x80000000 // Wake key could be any key For the HID keyboard, the filter driver should be an upper device filter driver for the System Control device. The power keys on HID devices are reported not as part of the Keyboard top-level collection but as part of the System Control collection, and enumerated as a separate raw device. So, to install the filter, you should enumerate HID devices to look for HID_DEVICE_SYSTEM_CONTROL in the HardwareID list and place the filter as an upper device filter. As a result you will directly attach to the Physical Device Object (PDO) of the system control device and filter the IOCTL_GET_SYS_BUTTON_CAPS as shown previously. PropertiesArticle ID: 302092 - Last Review: August 1, 2005 - Revision: 3.0 APPLIES TO
| Article Translations
|


Back to the top








