Chosen Solution
Dear iFixit Community, In 2019, a little water was spilled over my MacBook Pro A1502 on macOS 10.14.6. While it still ran just fine, it was now shutting itself down after five seconds of inactivity, i.e. no key press or trackpad interaction. Unable to work, I took my laptop to Apple and their answer was a complete replacement for both the logic board and the keyboard… Seeing the repair was almost as expensive as a new Mac, I got back home with my half-broken computer. After trying a plethora of things, I realized my Mac would not shut itself down if I kept a piece of duct tape over a keyboard key to have it pressed down all the time. Also, this mystery never happened while running Linux. Finally tried to remove the tape a few months ago, and to my surprise, this odd issue never reappeared… Until this week. Why? Nothing happened, so I really have no idea. To write this message, I had to tape down my function key again, but I thought some of you might have a better solution? Anyway, thank you for reading. <3
You might want to run the onboard diagnostics to see if any errors show up, depending on what macOS your system has this may not work as Apple messed up the systems firmware. But still give it a try! Restart your system and press the D key to enter. Let us know what happens. Reference: Mac startup key combinations Sadly this sounds like corrosion damage within the keyboard. It’s a bit of work to replace the keyboard alone as such I recommend replacing the full uppercase assembly MacBook Pro 13" Retina (Late 2013-Mid 2014) Upper Case Assembly as its a lot less work and the cost is quite reasonable vs replacing the keyboard alone MacBook Pro 13" Retina (Late 2013-Early 2015) Keyboard In either case you’ll need to follow this guide MacBook Pro 13" Retina Display Mid 2014 Upper Case Replacement which gets you to the point of replacing the uppercase. To replace the keyboard you still have to carefully remove the keyboard out of the case.