Set power button behavior

By default, pressing the power button puts the computer to sleep mode. However, you can change the power button behavior in Windows Control Panel.
  1. Right-click the battery status icon in the Windows notification area.
  2. Select Power Options > Choose what the power buttons do.