Okay so first of all it's an early 2015 13-inch MacBook air, running High Sierra 10.13.3. It's never had any problems in the past. After using it the other day, I closed it and sat it next to me. When I reopened it about an hour later, the keyboard was not working properly. Keys were not reacting, or were producing the wrong letter (sometimes multiple letters). Some keys ('p') were repeatedly pressing themselves Shift and capslock were turning themselves on and off, and I couldn't do anything about it. After an hour of trying I managed to type my password in, and enabled the virtual keyboard. I ran an avast full scan which came back clear (didn't have antivirus before this though.). I then got a usb keyboard, which helped most of the problems. The shift key was still intermittently pressing itself though, and I started to notice flickering lines across the screen. I tried resetting PRAM, VRAM but the problems persisted. Because I still wasn't sure if it was software or hardware, I decided to try getting everything important off, and wiping the whole thing. Unfortunately, none of the USB drives I inserted worked. They worked fine on a different Mac, and showed up under system report and disk utility, but clicking on the mount option did nothing. At the moment, the random pressing seems to have subsided, though shift continues to turn itself on and off. Oddly, I seem to have a few seconds after turning it on where the problems aren't as bad? There's some sort of error where text docs are showing up behind photos on my desktop - these disappear as soon as they're highlighted. I tried downloading a different anti-virus from malwarebytes, but the website was unusable: flickering black. I have no clue what's wrong; does anyone have any ideas? Software or hardware? Anything obvious I haven't tried yet? Does this seem like something that Apple would be able to (cheaply) fix, or should I be expecting to buy a new laptop? Thanks to anyone who read all of this, and for any help.