Zend certified PHP/Magento developer

How can I stop my keyboard’s Power button from shutting down my PC without disabling my laptop’s Power button?

I’ve got a Logitech K270 keyboard which, as shown in the image below, has a little “power” button on top of the row of F keys (the next-to-last key to the right on the top row). This is part of the keyboard’s hotkeys. I’ve accidentally pressed this button and turned my PC off a couple of times and it can be super frustrating.

How can I disable the keyboard’s power button?

According to this solution, I can use the Control Panel (Control PanelHardware and SoundPower OptionsSystem Settings) to change what happens when I press the power button or close the laptop lid. However, there’s a big problem here. If I use this approach, it also disables the laptop’s power button. But I still want the power button on the laptop to shut down my PC!!!

I also tried using AutoHotKey, but its KeyHook/KeyListener was not able to pick up on the keypress for the keyboard’s power button, so I wasn’t able to remap it.

Another solution would be to just physically remove the power key from my keyboard. But I’d like to keep my keyboard intact, even if that particular key is utterly useless to me.

Does anyone have any idea on how to fix this?

Thanks!!!

Logitech K270 hotkeys and power button