You can define what the power buttons (Power, sleep, etc.) should do when pressed in the Power options. You can simply set your power button to do nothing.
This will also affect the physical power button on your computer, though.
I’d try looking into AutoHotKey. The software is excellent and I use it for this exact purpose. The software is free and consumes almost nothing in resources.
I remapped the Sleep Key (in my case) to do absolutely nothing, and it’s trivial to do yourself.
Just open up the script in notepad
- Open up the script you’re using in notepad.
- Try entering
If this doesn’t disable it – then there a couple more steps you need to take.
- Install a keyboard hook by entering
- Find out what key it is by looking at the key history in the main window.
KEY::where KEY is the key’s name.
Pop it off with screwdriver. Works with any OS.
Try Tweak UI and look under the Explorer > Command Keys section for a key assignment.