Try this 1
If you want to perform an action like "Shutdown" after pressing a power off
button from keyboard then
Click on Start --> Run --> Type powercfg.cpl and press Enter.
"Power Options Properties" window will be opened.
Click on "Advanced" tab --> Under "Power buttons", select the action to be