Every key restarts MacBook (interfering with SMC and NVRAM/PRAM resets?)
In the process of trying to do SMC and NVRAM/PRAM resets to attempt to fix some problems I've been having with my MacBook, I've discovered every key on my keyboard will restart my computer. I'm not talking about waking the computer from sleep. I mean I've clicked "shut down..." and the computer has in fact shut down. But then, pressing any key (I haven't tried literally all of them, but enough to catch the pattern) the computer will restart. At first I thought it was just the left command key doing it, because every time I attempted to press and hold the keys necessary for the resets, the computer would immediately restart. Which I assume means none of my resets have worked? It's hard to tell, but certainly none of the problems I was trying to address have been fixed.
The problems: the fan running constantly (and loudly); blocks of colors periodically flashing across the top of the screen (the kind of color flashes you get, or used to, when a computer suddenly crashes). These have both been going on for a while, at least a year. There's also (this is more recent) excruciating slow browser (Safari) processing, which a cache clearing doesn't seem to have done anything to fix. It feels like the computer is constantly working at maximum capacity, even though I'm not using power-hungry programs, nothing involving graphics. Just normal office software. In activity monitor, the main source of usage is consistently Sync (the program).
The computer: MacBook Air, 2020, 1.1 GHz Quad-Core Intel Core i5, Sequoia 15.7.2