When MacBook Pro 2018 is completely shut down, it will power up by simply opening the lid, pressing any key, or tapping the trackpad, which is very annoying. I managed to make it not power up when the lid is lifted, but I couldn't figure out how to prevent the key presses or trackpad tap from doing so.
Short answer: you can't
MacBook Pro 2018 with Catalina 10.15.7
My experience is similar to Billie Hawkin's excellent answer above: setting AutoBoot to %00 prevents boot on lid open
sudo shutdown -h now did not, in my experience, prevent the behavior. When any key is pressed, the laptop still booted up.
What do service shops do? crack open the case and pull the battery!?
And Apple Support was no help :P
Just opinion: I don't think the computer is actually shutting down. The very nature of 'power off' would turn off USB/keyboard immediately.
By the behaviour you describe, the laptop is either going to 'sleep' or 'power nap' - and in either case, it's not shutting off.
To test this:
- Open the Terminal in Mac OS (found in /Applications/Utilities/ folder)
- Enter the following command syntax exactly:
sudo shutdown -h now
- Hit the return key and authenticate with an administrative password to immediately shut down the Mac
The Mac will immediately shut down. No data is saved and no dialogs are confirmed, the shut down happens instantly.
When the lights go out, the keyboard should become unresponsive, and you would now know for sure the mac is shut off.
EDIT: I realized that on my 2018 MBP, I had changed the "lid-open to turn on":
Disable Boot on Lid Open / Power Connection on MacBook Pro (2016+)
Open the Terminal, which is found in /Applications/Utilities/, and then enter the following command syntax exactly:
sudo nvram AutoBoot=%00
Hit return and authenticate with the admin password (necessary due to sudo)
Exit Terminal when finished
With AutoBoot turned off, when the MacBook Pro lid is opened, it will no longer boot the computer or turn the computer on simply by opening the lid. Additionally, connecting the power cable will not automatically boot the Mac. Instead, the behavior is like it was on earlier Macs, which can open the lid of a Mac without turning the computer itself on.
Sadly, I can't see anything out there in the NVRAM that will disable the key touch directly, yet.