The power button on your Mac computer is capable of doing so much more than simply shutting down your computer. This article will explain some of the alternate uses for your Mac's power button.
Uses for Your Mac's Power Button
Note: This tip applies to desktops and notebooks running Mac OS X Maverick, Yosemite, and El Capitan.
Click on your Menu and go to System Preferences > Energy Saver. Tick the option that reads Allow power button to put the computer to sleep. Once this option is enabled, you may use the power button to put your computer to sleep and then wake it up by simply pressing your power button once.
Display your shutdown options by holding your power button down for 3 seconds. These options include Restart, Sleep, and Shut Down.
Hold down the power button for 5 seconds to force restart your Mac. Be aware that you will lose any unsaved data by doing so.