How to customize power button action when pressed on Windows 10

You can change the default action of your PC's power button, and in this guide, we'll show you how to do it.

Although nowadays it's more common to use the power options in the Start menu to shut down Windows 10, there are still many users who feel more comfortable pressing the hardware power button to turn off their computers.

If you're in the group of users who prefer to use the physical button, you can also change its behavior to either do absolutely nothing, sleep, hibernate, shut down, or turn off the display when you press it. Something that can come in handy in many scenarios, for example, if you have a tablet, and you want it to hibernate instead of sleep to save battery life. Or on a desktop PC, you may prefer to use sleep mode instead of shutting down to resume the device more quickly.

In this Windows 10 guide, we'll walk you through the steps to change the power button action on your device using Control Panel and Command Prompt.

How to change power button action using Control Panel

Under "Power Options," click the Change what the power buttons do link.

Using the drop-down menu for "When I press the power button" select the action you want:

Do nothing.

Sleep.

Hibernate.

Shut down.

Turn off the display.

Click the Save changes button at the bottom of the window.

Once you completed the steps, every time you press the power button your computer will respond to the new action.

Depending on the hardware and device you own the settings available will be different. For example, the hibernation power state is not a feature supported on every system, which means that depending on the hardware this option may not be available. In addition, on laptops and other mobile devices like Surface Pro, you can define the power button action when it's plugged in and when it's running on battery.

How to change power button action using Command Prompt

If you prefer using command lines, it's also possible to use Command Prompt to define a new action for the power button.

Open Start.

Search for Command Prompt, right-click the result, and select Run as administrator.

Type the following command to change the default action for the power button and press Enter:

To change the default action when your computer is plugged in, use the following command: