How to disable keyboard's Power button in Windows 10?

Vox

Distinguished
Aug 9, 2012
176
2
18,685
Hello,

I'm surprised but I'm unable to find a solution for this question through Google.

I have a keyboard that has Power / Sleep / Wake Up buttons right above Print Screen / Scroll Lock / Pause.

I want to disable them because I always shut down my computer accidentally.

All I found are windows 7 solutions and some tweaking in the Control Panel\Hardware and Sound\Power Options\Edit Plan Settings, where I can edit Advanced Power Settings.

However, that's the wrong place because the "Power button and lid" section is not only for keyboard, it disables the computer case buttons aswell.

Can you help me where can I disable those darned keyboard buttons?
 
Solution
I saw some new info today while working on a software keyboard simulator program that may apply to this. Windows 7 supports up to sixteen F-keys. So I'm assuming Windows 8 and 10 do as well. If your power keys are mapped to those extended F-keys you may be able to use a keyboard macro program to make them do something other than what their current mappings are, e.g. capture the output and redirect it to something else rather than the power functions. Or maybe disable them altogether. You'll need to search for a macro recorder that supports the F-keys beyond F12 which is the standard keyboard layout, i.e. F13 through F16.

Search "keyboard macro program windows 10 all function keys" and/or "how to macro your keyboard"

There may or may...

Vox

Distinguished
Aug 9, 2012
176
2
18,685
Kidding or?

Really, there's no solution for this in a serious and up-to-date software like Windows 10?

Don't get my wrong I appreciate your answers but it's just pathetic that I should physically remove a button because there's no software solution in Windows to disable a key's functionality. What age is this? Prehistoric?
 

Colif

Win 11 Master
Moderator
does this work?

I have found that when the keyboard is attached, two HID devices appear in Device Manager:
"HID-compliant consumer control device"
"HID-compliant system controller"
By disabling the second device, the keyboard power key is disabled but the Front Panel Power Button momentary press still does an orderly shutdown. The keyboard in question doesn't have a "Sleep" key, but I expect that key might also get disabled

https://social.technet.microsoft.com/Forums/windowsserver/en-US/6c69af27-53bf-4385-b271-a991b05621ba/how-to-disable-the-keyboard-power-key-but-not-the-front-panel-power-button?forum=winservergen scroll to last post on page

I have to guess this is an old keyboard as even the wiki article about power buttons on keyboards hasn't been upgraded since Vista and I can't remember last keyboard I had with one. Most of the solutions come from 2007 or earlier as I think thats when they were around.
 

Vox

Distinguished
Aug 9, 2012
176
2
18,685
I have 4 HID-compliant stuff in Device Manager. Disabled all of them:

http://imgur.com/ZOBWXkl

I also found 2 HID Keyboard Devices along my generic keyboard. (see the attached image please). I tried to uninstall them (there's no option to Disable) but they are reinstalled automatically on windows restart. The option to prevent them to shut down the machine is greyed out.

Also found some settings in the ACPI menu of UEFI for turning off the machine with keyboard and/or mouse and they are also turned off (by default I think).

My keyboard Power Button is still functioning.
 
I saw some new info today while working on a software keyboard simulator program that may apply to this. Windows 7 supports up to sixteen F-keys. So I'm assuming Windows 8 and 10 do as well. If your power keys are mapped to those extended F-keys you may be able to use a keyboard macro program to make them do something other than what their current mappings are, e.g. capture the output and redirect it to something else rather than the power functions. Or maybe disable them altogether. You'll need to search for a macro recorder that supports the F-keys beyond F12 which is the standard keyboard layout, i.e. F13 through F16.

Search "keyboard macro program windows 10 all function keys" and/or "how to macro your keyboard"

There may or may not be something built into Windows 10 that will deal with the extended F-keys or possibly some driver or macro program that came with the keyboard.
 
Solution