View Single Post
  #7  
Old April 27th 20, 03:02 PM posted to microsoft.public.windowsxp.general
JJ[_11_]
external usenet poster
 
Posts: 744
Default How to disable a keyboards shutdown and sleep keys ?

On Mon, 27 Apr 2020 10:19:35 +0200, R.Wieser wrote:

I noticed that when I tried to spot those keystrokes using SetWindowsHookEx
using WH_KEYBOARD_LL. I saw nothing for those keys.


Power management key codes are "eaten" by the kernel. They're not passed to
user code - even if the power policy is configured to not do anything when
one of those keys is pressed.

Under DOS, user programs can hook the keyboard IRQ handler - thus can see
the power management key scancodes - before they're processed by BIOS.
Ads