(Keyboard cleaning) How to prevent MacBook Pro from powering up by pressing any key?
The Mac is shutting down and powering off, but newer Mac's include a feature that powers on when any key is pressed or the touch pad is touched.
If you need to stop this behavior--to clean the keyboard, for example--you can force a shutdown once.
Press and hold the left Control and Command buttons with the right Shift button for a total of 7 seconds. Without releasing them, press the Power button and hold them all together for an additional 7 seconds. Your Mac can only be powered on by using the Power button.
Unfortunately, there is no way to disable this permanently.
MacBook Pro, OS X 10.11